Gets WP2 tests running with atest.
Tests now both run and pass using atest or Android Studio. Two tests are
being ignored for now as documented in b/248538709.
Fixed: 240972674
Bug: 248538709
Test: TreeHugger, launched app
Change-Id: I51dd0ecd89b8b10f2186cc067c79d78aec83a1b0
diff --git a/tests/Android.bp b/tests/Android.bp
index 5d291be..54a3842 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -23,33 +23,29 @@
android_test {
name: "WallpaperPicker2Tests",
- static_libs: [
- "androidx.annotation_annotation",
- "androidx.test.core",
- "androidx.test.runner",
- "androidx.test.rules",
- "androidx.test.espresso.contrib",
- "androidx.test.espresso.intents",
- "mockito-target-minus-junit4",
- "androidx.test.espresso.core",
- "hamcrest-library",
- "hamcrest",
- "wallpaper-common-deps",
- ],
-
- platform_apis: true,
-
-
- optimize: {
- enabled: false,
- },
-
+ defaults: ["WallpaperPicker2_defaults"],
srcs: [
"src/**/*.java",
"src/**/*.kt",
],
+ static_libs: [
+ "androidx.annotation_annotation",
+ "androidx.test.espresso.core",
+ "androidx.test.espresso.contrib",
+ "androidx.test.espresso.intents",
+ "androidx.test.rules",
+ "hamcrest-library",
+ "hamcrest",
+ "mockito-target-minus-junit4",
+ "ub-uiautomator",
+ "junit",
+ ],
+ libs: [
+ "android.test.runner",
+ "android.test.base",
+ "android.test.mock",
+ ],
- manifest: "AndroidManifest.xml",
-
- instrumentation_for: "WallpaperPicker2",
+ platform_apis: true,
+ test_suites: ["device-tests"],
}