Move MockedVehicleHal to a separate test library under vehiclehal
- refactor for future tests that depend on MockedVehicleHal
- change dependency
Bug: 140900347
Bug: 142554800
Test: atest CarServiceTest VehicleHALTest
Change-Id: Ib6391ac0946f5ed7a0868ebf74ea16d8c30f4f25
diff --git a/tests/EmbeddedKitchenSinkApp/Android.mk b/tests/EmbeddedKitchenSinkApp/Android.mk
index 488ddaf..18a6943 100644
--- a/tests/EmbeddedKitchenSinkApp/Android.mk
+++ b/tests/EmbeddedKitchenSinkApp/Android.mk
@@ -49,7 +49,7 @@
LOCAL_STATIC_JAVA_LIBRARIES += \
android.hidl.base-V1.0-java \
android.hardware.automotive.vehicle-V2.0-java \
- vehicle-hal-support-lib \
+ vehicle-hal-support-lib-for-test \
com.android.car.keventreader-client \
guava \
android.car.cluster.navigation
diff --git a/tests/carservice_test/Android.mk b/tests/carservice_test/Android.mk
index 33f43df..813883d 100644
--- a/tests/carservice_test/Android.mk
+++ b/tests/carservice_test/Android.mk
@@ -49,7 +49,7 @@
com.android.car.test.utils \
mockito-target-extended \
truth-prebuilt \
- vehicle-hal-support-lib
+ vehicle-hal-support-lib-for-test
LOCAL_JAVA_LIBRARIES := \
diff --git a/vehicle-hal-support-lib/Android.bp b/vehicle-hal-support-lib/Android.bp
index 92e1ccf..ca685a4 100644
--- a/vehicle-hal-support-lib/Android.bp
+++ b/vehicle-hal-support-lib/Android.bp
@@ -21,7 +21,19 @@
static_libs: [
"android.hidl.base-V1.0-java",
- "android.hardware.automotive.vehicle-V2.0-java",
+ "android.hardware.automotive.vehicle-V2.0-java"
+ ],
+
+}
+
+java_library {
+
+ name: "vehicle-hal-support-lib-for-test",
+
+ srcs: ["test/**/*.java"],
+
+ static_libs: [
+ "vehicle-hal-support-lib",
"junit",
],
diff --git a/vehicle-hal-support-lib/src/com/android/car/vehiclehal/test/MockedVehicleHal.java b/vehicle-hal-support-lib/test/com/android/car/vehiclehal/test/MockedVehicleHal.java
similarity index 100%
rename from vehicle-hal-support-lib/src/com/android/car/vehiclehal/test/MockedVehicleHal.java
rename to vehicle-hal-support-lib/test/com/android/car/vehiclehal/test/MockedVehicleHal.java