Use annotation for tests that require a device
Currently all flicker tests run on a physical devices.
In the future, some flicker tests may run on a physical devices
and others may run on virtual devices for scalability. In this CL
we use the "RequireDevice" annotation to indicate which tests should
run on device
Test: atest FlickerTests
Change-Id: I472c30612535310265717a5ae420feb534159c41
diff --git a/tests/FlickerTests/Android.bp b/tests/FlickerTests/Android.bp
index 952997e..943d783 100644
--- a/tests/FlickerTests/Android.bp
+++ b/tests/FlickerTests/Android.bp
@@ -18,7 +18,7 @@
name: "FlickerTests",
srcs: ["src/**/*.java", "src/**/*.kt"],
manifest: "AndroidManifest.xml",
- test_config: "AndroidTest.xml",
+ test_config: "AndroidTestPhysicalDevices.xml",
platform_apis: true,
certificate: "platform",
test_suites: ["device-tests"],
@@ -33,3 +33,24 @@
"launcher-aosp-tapl"
],
}
+
+
+android_test {
+ name: "FlickerTestsVirtual",
+ srcs: ["src/**/*.java", "src/**/*.kt"],
+ manifest: "AndroidManifest.xml",
+ test_config: "AndroidTestVirtualDevices.xml",
+ platform_apis: true,
+ certificate: "platform",
+ test_suites: ["device-tests"],
+ libs: ["android.test.runner"],
+ static_libs: [
+ "androidx.test.ext.junit",
+ "flickertestapplib",
+ "flickerlib",
+ "truth-prebuilt",
+ "app-helpers-core",
+ "launcher-helper-lib",
+ "launcher-aosp-tapl"
+ ],
+}
\ No newline at end of file