Setup on device testing for sys ui
This borrows on the testing infrastructure set up by the phone sys ui
team and provides an examples via test for CarNavigationBarController.
Bug: 143227120
Test: atest CarNavigationBarControllerTest
Change-Id: I10fd4e2e51f2faf75ade5b40e47441a9e948f075
diff --git a/packages/CarSystemUI/Android.bp b/packages/CarSystemUI/Android.bp
index 672879a..b2451c9 100644
--- a/packages/CarSystemUI/Android.bp
+++ b/packages/CarSystemUI/Android.bp
@@ -63,6 +63,64 @@
}
+android_library {
+ name: "CarSystemUI-tests",
+ manifest: "tests/AndroidManifest.xml",
+ resource_dirs: [
+ "tests/res",
+ "res-keyguard",
+ "res",
+ ],
+ srcs: [
+ "tests/src/**/*.java",
+ "src/**/*.java",
+ "src/**/I*.aidl",
+ ],
+ static_libs: [
+ "SystemUI-tests",
+ "CarNotificationLib",
+ "SystemUIPluginLib",
+ "SystemUISharedLib",
+ "SettingsLib",
+ "android.car.userlib",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.recyclerview_recyclerview",
+ "androidx.preference_preference",
+ "androidx.appcompat_appcompat",
+ "androidx.mediarouter_mediarouter",
+ "androidx.palette_palette",
+ "androidx.legacy_legacy-preference-v14",
+ "androidx.leanback_leanback",
+ "androidx.slice_slice-core",
+ "androidx.slice_slice-view",
+ "androidx.slice_slice-builders",
+ "androidx.arch.core_core-runtime",
+ "androidx.lifecycle_lifecycle-extensions",
+ "SystemUI-tags",
+ "SystemUI-proto",
+ "metrics-helper-lib",
+ "androidx.test.rules", "hamcrest-library",
+ "mockito-target-inline-minus-junit4",
+ "testables",
+ "truth-prebuilt",
+ "dagger2-2.19",
+ "//external/kotlinc:kotlin-annotations",
+ ],
+ libs: [
+ "android.test.runner",
+ "telephony-common",
+ "android.test.base",
+ "android.car",
+ ],
+
+ aaptflags: [
+ "--extra-packages",
+ "com.android.systemui",
+ ],
+
+ plugins: ["dagger2-compiler-2.19"],
+}
+
android_app {
name: "CarSystemUI",