From 3685883c63233f592cb8e560c25fd033dcaeb754 Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Thu, 19 Sep 2024 17:16:30 -0700 Subject: [PATCH] Use static libjsoncpp for unit tests. The test environment might miss the shared libjsoncpp lib. Flag: EXEMPT test Test: Presubmit Bug: 368371598 Change-Id: I30915c907c06f577d6428af8aa745dd94c674dc1 --- .../impl/default_config/JsonConfigLoader/test/Android.bp | 4 ---- .../vehicle/aidl/impl/default_config/test/Android.bp | 8 ++------ .../aidl/impl/fake_impl/GeneratorHub/test/Android.bp | 2 -- .../vehicle/aidl/impl/fake_impl/hardware/test/Android.bp | 2 +- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/test/Android.bp b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/test/Android.bp index abf15c5429..90ea02762e 100644 --- a/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/test/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/JsonConfigLoader/test/Android.bp @@ -27,8 +27,6 @@ cc_test { "VehicleHalJsonConfigLoader", "VehicleHalUtils", "libgtest", - ], - shared_libs: [ "libjsoncpp", ], defaults: ["VehicleHalDefaults"], @@ -43,8 +41,6 @@ cc_test { "VehicleHalJsonConfigLoaderEnableTestProperties", "VehicleHalUtils", "libgtest", - ], - shared_libs: [ "libjsoncpp", ], defaults: ["VehicleHalDefaults"], diff --git a/automotive/vehicle/aidl/impl/default_config/test/Android.bp b/automotive/vehicle/aidl/impl/default_config/test/Android.bp index 52014fb2d1..a88913e66a 100644 --- a/automotive/vehicle/aidl/impl/default_config/test/Android.bp +++ b/automotive/vehicle/aidl/impl/default_config/test/Android.bp @@ -29,13 +29,11 @@ cc_test { "VehicleHalUtils", "libgmock", "libgtest", + "libjsoncpp", ], header_libs: [ "IVehicleGeneratedHeaders-V4", ], - shared_libs: [ - "libjsoncpp", - ], data: [ ":VehicleHalDefaultProperties_JSON", ], @@ -52,6 +50,7 @@ cc_test { "VehicleHalUtils", "libgmock", "libgtest", + "libjsoncpp", ], cflags: [ "-DENABLE_VEHICLE_HAL_TEST_PROPERTIES", @@ -59,9 +58,6 @@ cc_test { header_libs: [ "IVehicleGeneratedHeaders-V4", ], - shared_libs: [ - "libjsoncpp", - ], data: [ ":VehicleHalDefaultProperties_JSON", ":VehicleHalTestProperties_JSON", diff --git a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp index 4bc0b123de..0d814eafb9 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/GeneratorHub/test/Android.bp @@ -28,8 +28,6 @@ cc_test { "VehicleHalUtils", "FakeVehicleHalValueGenerators", "FakeObd2Frame", - ], - shared_libs: [ "libjsoncpp", ], data: [ diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp index 9f002dd7cd..62c114780a 100644 --- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp +++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/Android.bp @@ -40,10 +40,10 @@ cc_test { "FakeUserHal", "libgtest", "libgmock", + "libjsoncpp", ], shared_libs: [ "libgrpc++", - "libjsoncpp", "libprotobuf-cpp-full", ], data: [