Merge "Stop instrumenting car service fro car service unit test" into qt-dev
am: 38058ebadd
Change-Id: If9ee8f98c90b39a76b6e18f6b0dc4dafccb10789
diff --git a/tests/carservice_test/Android.mk b/tests/carservice_test/Android.mk
index 2ac3256..1aacf9d 100644
--- a/tests/carservice_test/Android.mk
+++ b/tests/carservice_test/Android.mk
@@ -40,14 +40,16 @@
LOCAL_STATIC_JAVA_LIBRARIES := junit
LOCAL_STATIC_JAVA_LIBRARIES += \
- car-service-lib-for-test \
- vehicle-hal-support-lib \
- car-systemtest \
- mockito-target-inline \
androidx.test.rules \
android.hardware.automotive.vehicle-V2.0-java \
+ car-frameworks-service \
+ car-service-lib-for-test \
+ car-systemtest \
com.android.car.test.utils \
- truth-prebuilt
+ mockito-target-inline \
+ truth-prebuilt \
+ vehicle-hal-support-lib
+
LOCAL_JAVA_LIBRARIES := \
android.car \
diff --git a/tests/carservice_test/AndroidManifest.xml b/tests/carservice_test/AndroidManifest.xml
index 7c92513..b5d2882 100644
--- a/tests/carservice_test/AndroidManifest.xml
+++ b/tests/carservice_test/AndroidManifest.xml
@@ -33,7 +33,7 @@
android:targetPackage="com.android.car.test"
android:label="Tests for Car APIs"/>
- <application android:label="CarServiceTest" android:name=".CarServiceTestApp"
+ <application android:label="CarServiceTest" android:name=".CarServiceTestApp"
android:debuggable="true">
<uses-library android:name="android.test.runner" />
<service android:name="com.android.car.TestAppBlockingPolicyService"
diff --git a/tests/carservice_unit_test/Android.mk b/tests/carservice_unit_test/Android.mk
index ccc97b5..6223755 100644
--- a/tests/carservice_unit_test/Android.mk
+++ b/tests/carservice_unit_test/Android.mk
@@ -20,6 +20,11 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res \
+ packages/services/Car/service/res
+
+LOCAL_AAPT_FLAGS += --extra-packages com.android.car --auto-add-overlay
+
LOCAL_PACKAGE_NAME := CarServiceUnitTest
LOCAL_PRIVATE_PLATFORM_APIS := true
@@ -41,11 +46,14 @@
android.test.base
LOCAL_STATIC_JAVA_LIBRARIES := \
- junit \
androidx.test.core \
androidx.test.rules \
- mockito-target-minus-junit4 \
+ car-frameworks-service \
+ car-service-lib-for-test \
com.android.car.test.utils \
+ junit \
+ mockito-target-minus-junit4 \
truth-prebuilt
+
include $(BUILD_PACKAGE)
diff --git a/tests/carservice_unit_test/AndroidManifest.xml b/tests/carservice_unit_test/AndroidManifest.xml
index 1a9a3cc..74f6aa1 100644
--- a/tests/carservice_unit_test/AndroidManifest.xml
+++ b/tests/carservice_unit_test/AndroidManifest.xml
@@ -19,7 +19,7 @@
package="com.android.car.carservice_unittest"
android:sharedUserId="android.uid.system" >
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
- android:targetPackage="com.android.car"
+ android:targetPackage="com.android.car.carservice_unittest"
android:label="Unit Tests for Car APIs"/>
<application android:label="CarServiceUnitTest">