Update ravenwood TEST_MAPPING
Flag: EXEMPT host test change only
Bug: 376283818
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b4e83221bece4ce39d85a21fa7dd0729e3bdfbc4)
Merged-In: I3509fdcbe6470ce1f109877f9b20682cdf60399e
Change-Id: I3509fdcbe6470ce1f109877f9b20682cdf60399e
diff --git a/ravenwood/TEST_MAPPING b/ravenwood/TEST_MAPPING
index 7fa0ef1..a1243e3 100644
--- a/ravenwood/TEST_MAPPING
+++ b/ravenwood/TEST_MAPPING
@@ -35,18 +35,18 @@
},
{
"name": "CarLibHostUnitTest",
- "host": true,
- "keywords": ["automotive_code_coverage"]
+ "keywords": ["automotive_code_coverage"],
+ "host": true
},
{
"name": "CarServiceHostUnitTest",
- "host": true,
- "keywords": ["automotive_code_coverage"]
+ "keywords": ["automotive_code_coverage"],
+ "host": true
},
{
"name": "CarSystemUIRavenTests",
- "host": true,
- "keywords": ["automotive_code_coverage"]
+ "keywords": ["automotive_code_coverage"],
+ "host": true
},
{
"name": "CtsAccountManagerTestCasesRavenwood",
@@ -65,6 +65,10 @@
"host": true
},
{
+ "name": "CtsDeviceConfigTestCasesRavenwood",
+ "host": true
+ },
+ {
"name": "CtsGraphicsTestCasesRavenwood",
"host": true
},
diff --git a/ravenwood/scripts/update-test-mapping.sh b/ravenwood/scripts/update-test-mapping.sh
index e478b50..ab37baf 100755
--- a/ravenwood/scripts/update-test-mapping.sh
+++ b/ravenwood/scripts/update-test-mapping.sh
@@ -23,6 +23,14 @@
# Tests that shouldn't be in presubmit.
EXEMPT='^(SystemUiRavenTests)$'
+is_car() {
+ local module="$1"
+
+ # If the module name starts with "Car", then it's a test for "Car".
+ [[ "$module" =~ ^Car ]]
+ return $?
+}
+
main() {
local script_name="${0##*/}"
local script_dir="${0%/*}"
@@ -62,6 +70,10 @@
fi
echo " {"
echo " \"name\": \"${tests[$i]}\","
+ if is_car "${tests[$i]}"; then
+ echo ' "keywords": ["automotive_code_coverage"],'
+ fi
+
echo " \"host\": true"
echo " }$comma"