aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--json_module_graph/findModulesWithTestSuitesValue.jq12
1 files changed, 12 insertions, 0 deletions
diff --git a/json_module_graph/findModulesWithTestSuitesValue.jq b/json_module_graph/findModulesWithTestSuitesValue.jq
new file mode 100644
index 00000000..02af5975
--- /dev/null
+++ b/json_module_graph/findModulesWithTestSuitesValue.jq
@@ -0,0 +1,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 | .[]