aboutsummaryrefslogtreecommitdiff
path: root/json_module_graph/findModulesWithTestSuitesValue.jq
blob: 02af59751b9fd48fb8542f44a2f6fbac392b9811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# CMD: Returns the modules that have test_suites property with $arg as one of its value.
# Use $arg2 as the top level field key to be collected, e.g. Name, Blueprint.

def hasTestSuitesWithValue($a):
  .[] | select(.Name == "Test_suites") | .Values | .[] | . == $a
;

[.[] |
select(.Module.Android.SetProperties |
    if . == null then [] else . end |
    hasTestSuitesWithValue($arg)) |
.[$arg2] ] | unique | sort | .[]