From 1cde7070dbcdf86968766fc7bd6d8e42625f8723 Mon Sep 17 00:00:00 2001 From: Lais Andrade Date: Tue, 18 Jul 2023 12:51:28 +0100 Subject: [PATCH] Add vibrator service test mapping to source folder Move TEST_MAPPING for FrameworksVibratorServicesTests to the source code at services/core/java/com/android/server/vibrator. This ensures that any changes in this source folder will also trigger FrameworksVibratorServicesTests. Uodate TEST_MAPPING at the test folder to import the new one, since changes in test files should also trigger the tests. This change also removes AndroidTest.xml, since it can use the auto-generated one. Test: atest --test-mapping \ services/core/java/com/android/server/vibrator:presubmit Bug: 290745798 Change-Id: I664f952035379000aedfa0a0339f3d0b8f2c16e0 --- .../com/android/server/vibrator/TEST_MAPPING | 21 ++++++++++++ services/tests/vibrator/AndroidManifest.xml | 3 +- services/tests/vibrator/AndroidTest.xml | 34 ------------------- services/tests/vibrator/TEST_MAPPING | 18 ++-------- 4 files changed, 24 insertions(+), 52 deletions(-) create mode 100644 services/core/java/com/android/server/vibrator/TEST_MAPPING delete mode 100644 services/tests/vibrator/AndroidTest.xml diff --git a/services/core/java/com/android/server/vibrator/TEST_MAPPING b/services/core/java/com/android/server/vibrator/TEST_MAPPING new file mode 100644 index 0000000000000..f0a7e470f8fda --- /dev/null +++ b/services/core/java/com/android/server/vibrator/TEST_MAPPING @@ -0,0 +1,21 @@ +{ + "presubmit": [ + { + "name": "FrameworksVibratorServicesTests", + "options": [ + {"exclude-annotation": "android.platform.test.annotations.LargeTest"}, + {"exclude-annotation": "android.platform.test.annotations.FlakyTest"}, + {"exclude-annotation": "androidx.test.filters.FlakyTest"}, + {"exclude-annotation": "org.junit.Ignore"} + ] + } + ], + "postsubmit": [ + { + "name": "FrameworksVibratorServicesTests", + "options": [ + {"exclude-annotation": "org.junit.Ignore"} + ] + } + ] +} diff --git a/services/tests/vibrator/AndroidManifest.xml b/services/tests/vibrator/AndroidManifest.xml index 2a15c15fce41c..a14ea5598758c 100644 --- a/services/tests/vibrator/AndroidManifest.xml +++ b/services/tests/vibrator/AndroidManifest.xml @@ -31,8 +31,7 @@ - + diff --git a/services/tests/vibrator/AndroidTest.xml b/services/tests/vibrator/AndroidTest.xml deleted file mode 100644 index d5ee3afaedb6d..0000000000000 --- a/services/tests/vibrator/AndroidTest.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - diff --git a/services/tests/vibrator/TEST_MAPPING b/services/tests/vibrator/TEST_MAPPING index f0a7e470f8fda..22b72fa4ff9ee 100644 --- a/services/tests/vibrator/TEST_MAPPING +++ b/services/tests/vibrator/TEST_MAPPING @@ -1,21 +1,7 @@ { - "presubmit": [ + "imports": [ { - "name": "FrameworksVibratorServicesTests", - "options": [ - {"exclude-annotation": "android.platform.test.annotations.LargeTest"}, - {"exclude-annotation": "android.platform.test.annotations.FlakyTest"}, - {"exclude-annotation": "androidx.test.filters.FlakyTest"}, - {"exclude-annotation": "org.junit.Ignore"} - ] - } - ], - "postsubmit": [ - { - "name": "FrameworksVibratorServicesTests", - "options": [ - {"exclude-annotation": "org.junit.Ignore"} - ] + "path": "frameworks/base/services/core/java/com/android/server/vibrator" } ] }