Migrate packages/services/Car to androidx.test
android-support-test has long been deprecated and unsupported,
and it causes problems having both androidx.test and
android.support.test included in one binary.
Test: m -j BugReportAppTest
Change-Id: I89a6a4aaf1c104083456123227db1c331205581d
diff --git a/tests/BugReportApp/tests/Android.bp b/tests/BugReportApp/tests/Android.bp
index ba325b8..7bd1e59 100644
--- a/tests/BugReportApp/tests/Android.bp
+++ b/tests/BugReportApp/tests/Android.bp
@@ -32,7 +32,7 @@
],
static_libs: [
- "android-support-test",
+ "androidx.test.rules",
"mockito-target",
"truth-prebuilt",
],
diff --git a/tests/BugReportApp/tests/AndroidManifest.xml b/tests/BugReportApp/tests/AndroidManifest.xml
index 26736c6..415093c 100644
--- a/tests/BugReportApp/tests/AndroidManifest.xml
+++ b/tests/BugReportApp/tests/AndroidManifest.xml
@@ -23,7 +23,7 @@
</application>
<instrumentation
- android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:name="androidx.test.runner.AndroidJUnitRunner"
android:label="BugReportAppTest"
android:targetPackage="com.android.car.bugreport" />
</manifest>
diff --git a/tests/BugReportApp/tests/src/com/android/car/bugreport/BugStorageUtilsTest.java b/tests/BugReportApp/tests/src/com/android/car/bugreport/BugStorageUtilsTest.java
index d210e61..76a0270 100644
--- a/tests/BugReportApp/tests/src/com/android/car/bugreport/BugStorageUtilsTest.java
+++ b/tests/BugReportApp/tests/src/com/android/car/bugreport/BugStorageUtilsTest.java
@@ -33,11 +33,12 @@
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
+
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/BugReportApp/tests/src/com/android/car/bugreport/TtlPointsDecrementalTest.java b/tests/BugReportApp/tests/src/com/android/car/bugreport/TtlPointsDecrementalTest.java
index e196914..6a35509 100644
--- a/tests/BugReportApp/tests/src/com/android/car/bugreport/TtlPointsDecrementalTest.java
+++ b/tests/BugReportApp/tests/src/com/android/car/bugreport/TtlPointsDecrementalTest.java
@@ -28,9 +28,10 @@
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.filters.MediumTest;
-import android.support.test.runner.AndroidJUnit4;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.filters.MediumTest;
+import androidx.test.runner.AndroidJUnit4;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/OccupantAwareness/Android.bp b/tests/OccupantAwareness/Android.bp
index 2160572..a206eee 100644
--- a/tests/OccupantAwareness/Android.bp
+++ b/tests/OccupantAwareness/Android.bp
@@ -38,7 +38,7 @@
],
static_libs: [
- "android-support-test",
+ "androidx.test.rules",
"truth-prebuilt",
"android.hardware.automotive.occupant_awareness-java",
"android.test.base.stubs",
diff --git a/tools/perf/app-launch-test/app_launch_perf_test.sh b/tools/perf/app-launch-test/app_launch_perf_test.sh
index df9ffea..1c44020 100755
--- a/tools/perf/app-launch-test/app_launch_perf_test.sh
+++ b/tools/perf/app-launch-test/app_launch_perf_test.sh
@@ -73,7 +73,7 @@
-e class 'android.platform.test.scenario.dial.OpenAppMicrobenchmark,android.platform.test.scenario.googleplay.OpenAppMicrobenchmark,android.platform.test.scenario.maps.OpenAppMicrobenchmark,android.platform.test.scenario.radio.OpenAppMicrobenchmark,android.platform.test.scenario.settings.OpenAppMicrobenchmark'\
-e favor-shell-commands true -e log false -e suite-timeout_msec 36000000\
-e durationMs 30000 -e press-home $2 -e newRunListenerMode true\
- -e timeout_msec 300000 -e drop-cache $3 -e kill-app $4 android.platform.test.scenario/android.support.test.runner.AndroidJUnitRunner"
+ -e timeout_msec 300000 -e drop-cache $3 -e kill-app $4 android.platform.test.scenario/androidx.test.runner.AndroidJUnitRunner"
# Example output from ${cmd}
#
# INSTRUMENTATION_STATUS: class=android.platform.test.scenario.maps.OpenAppMicrobenchmark