From 1a0195349b543b89cd516e6a81ff64d0bedf5555 Mon Sep 17 00:00:00 2001 From: Andrei Onea Date: Fri, 7 Feb 2020 19:37:28 +0000 Subject: [PATCH] Add TEST_MAPPING for gating and logging The tests included are unit tests for the implementation (under FrameworksServicesTests), for the corresponding TestRule (PlatformCompatGating) and CTS tests. Bug: 137821288 Test: cd frameworks/base/core/java/android/app/compat && atest Test: cd frameworks/base/services/core/java/com/android/server/compat \ && atest Change-Id: I1a652775715f1a9738cc72725303bc78dfa17d03 --- core/java/android/app/compat/TEST_MAPPING | 7 +++++++ .../com/android/server/compat/TEST_MAPPING | 21 +++++++++++++++++++ tests/PlatformCompatGating/Android.bp | 1 + 3 files changed, 29 insertions(+) create mode 100644 core/java/android/app/compat/TEST_MAPPING create mode 100644 services/core/java/com/android/server/compat/TEST_MAPPING diff --git a/core/java/android/app/compat/TEST_MAPPING b/core/java/android/app/compat/TEST_MAPPING new file mode 100644 index 0000000000000..c047df514e8dd --- /dev/null +++ b/core/java/android/app/compat/TEST_MAPPING @@ -0,0 +1,7 @@ +{ + "imports": [ + { + "path": "frameworks/base/services/core/java/com/android/services/compat" + } + ] +} \ No newline at end of file diff --git a/services/core/java/com/android/server/compat/TEST_MAPPING b/services/core/java/com/android/server/compat/TEST_MAPPING new file mode 100644 index 0000000000000..0c30c790c5dda --- /dev/null +++ b/services/core/java/com/android/server/compat/TEST_MAPPING @@ -0,0 +1,21 @@ +{ + "presubmit": [ + // Unit tests + { + "name": "FrameworksServicesTests", + "options": [ + { + "include-filter": "com.android.server.compat" + } + ] + }, + // Tests for the TestRule + { + "name": "PlatformCompatGating" + }, + // CTS tests + { + "name": "CtsAppCompatHostTestCases#" + } + ] +} \ No newline at end of file diff --git a/tests/PlatformCompatGating/Android.bp b/tests/PlatformCompatGating/Android.bp index 74dfde848191b..342c47de755a6 100644 --- a/tests/PlatformCompatGating/Android.bp +++ b/tests/PlatformCompatGating/Android.bp @@ -18,6 +18,7 @@ android_test { name: "PlatformCompatGating", // Only compile source java files in this apk. srcs: ["src/**/*.java"], + test_suites: ["device-tests"], static_libs: [ "junit", "androidx.test.runner",