aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-20 13:44:21 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-06-20 13:44:21 +0000
commit49e958f5db3b1b8e5d3ded7fb2ed6577f876ff3d (patch)
treeb6f264fe79cec7d62680b71d2ea63efdcc91901a
parent2c207c900c0c08e60eba27d10343d59e10b99546 (diff)
parent65239c8c8091e71878ce9c0b58a3444b895c41b0 (diff)
downloadbazel-android13-frc-neuralnetworks-release.tar.gz
Snap for 8745897 from 65239c8c8091e71878ce9c0b58a3444b895c41b0 to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: Ib6dca7202eecb62e8283565fdc943cc75799caa8
-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 | .[]