Sprinkle in some TEST_MAPPING.
Bug: 139358215
Test: atest --test-mapping packages/providers/CalendarProvider
Change-Id: I14cbe66a654da2d15ef70081a05c8c5d2d4a43f3
diff --git a/tests/Android.bp b/tests/Android.bp
index 1528d4a..4f57e37 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -5,6 +5,7 @@
platform_apis: true,
test_suites: ["device-tests"],
static_libs: [
+ "androidx.test.rules",
"calendar-common",
"junit",
],
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 0ce5105..6aa45d4 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -25,18 +25,8 @@
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
- <!--
- The test declared in this instrumentation will be run along with tests declared by
- all other applications via the command: "adb shell itr".
- The "itr" command will find all tests declared by all applications. If you want to run just these
- tests on their own then use the command:
- "adb shell am instrument -w com.android.providers.calendar.tests/android.test.InstrumentationTestRunner"
-
- To test db upgrade:
- adb shell am instrument -w -e class com.android.providers.calendar.CalendarDatabaseHelperTest#testSchemasEqualForAllTables com.android.providers.calendar.tests/android.test.InstrumentationTestRunner
- -->
- <instrumentation android:name="android.test.InstrumentationTestRunner"
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.android.providers.calendar"
- android:label="calendar provider tests"/>
+ android:label="CalendarProvider tests"/>
</manifest>
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index 0b63420..e7d5d1a 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -20,9 +20,9 @@
<option name="test-suite-tag" value="apct" />
<option name="test-tag" value="CalendarProviderTests" />
- <test class="com.android.tradefed.testtype.InstrumentationTest" >
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="com.android.providers.calendar.tests" />
- <option name="runner" value="android.test.InstrumentationTestRunner" />
+ <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
<option name="hidden-api-checks" value="false"/>
</test>
</configuration>