Static link test lib shims with test -impl libs.
authorZhuoyao Zhang <zhuoyao@google.com>
Wed, 11 Oct 2017 00:53:09 +0000 (17:53 -0700)
committerSteven Moreland <smoreland@google.com>
Thu, 12 Oct 2017 22:47:39 +0000 (15:47 -0700)
* So that vts no longer needs to push the shim libs in hidl test.

Bug: 67500459
Test: make vts
      vts-tradefed run vts -m VtsHidlUnitTest
Change-Id: I52ad066370f08a461b848d7d96dc4a659eb2da4d

tests/bar/1.0/default/Android.bp
tests/baz/1.0/default/Android.bp
tests/foo/1.0/default/Android.bp
tests/foo/1.0/default/lib/Android.bp
tests/hash/1.0/default/Android.bp
tests/inheritance/1.0/default/Android.bp
tests/memory/1.0/default/Android.bp
tests/multithread/1.0/default/Android.bp
tests/pointer/1.0/default/Android.bp
tests/pointer/1.0/default/lib/Android.bp
tests/trie/1.0/default/Android.bp

index 82d34a95cc54cecf1e9f3e32b2173d627f1a5d15..8aa6135fa28af4b014ed4656426ead4b97d88401 100644 (file)
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.bar@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -14,10 +14,15 @@ cc_library_shared {
         "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
+    ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: [
         "android.hardware.tests.foo@1.0",
         "android.hardware.tests.bar@1.0",
     ],
-
 }
index f247b8378871c8815366cea3c4c1b9554e16e04f..492e0b4ae3323ab554bb363e9a6bdf6605a2c58f 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.baz@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,9 +7,15 @@ cc_library_shared {
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
+        "liblog",
         "libutils",
-        "android.hardware.tests.baz@1.0",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.baz@1.0"],
 }
index 0e1d34d355294369eedbaf54cfea5ac44b4f420d..d9dfc692666158abdfde3aa461310e203287f163 100644 (file)
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.foo@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -11,12 +11,16 @@ cc_library_shared {
     shared_libs: [
         "libbase",
         "libcutils",
+        "libfootest",
         "libhidlbase",
         "libhidltransport",
-        "libfootest",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "android.hardware.tests.foo@1.0",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.foo@1.0"],
+
 }
index 895582c58343b2fcf2619333d47598fab5353983..2cc96c551013419ef320e3838cfd4b4a13d2af43 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "libfootest",
     defaults: ["hidl_defaults"],
     srcs: [
@@ -6,10 +6,14 @@ cc_library_shared {
     ],
 
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "android.hardware.tests.foo@1.0",
+        "libhwbinder",
+        "liblog",
     ],
+    static_libs: ["android.hardware.tests.foo@1.0"],
+
     local_include_dirs: ["include/hidl-test"],
     export_include_dirs: ["include"],
 
index 67f90977d6f67c0cb6133261aaeb5ee48e9dbeed..6e6d6a8e363c8f42308b7af2eb05f4fb62ed424f 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.hash@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -6,9 +6,15 @@ cc_library_shared {
         "Hash.cpp",
     ],
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
+        "liblog",
         "libutils",
-        "android.hardware.tests.hash@1.0",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.hash@1.0"],
 }
index 158da4b1234ae320dc4394f7dccdb71d988232dd..891355b33975808ec19a508bc704cc6349603c6d 100644 (file)
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.inheritance@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -12,11 +12,16 @@ cc_library_shared {
 
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "android.hardware.tests.inheritance@1.0",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.inheritance@1.0"],
+
 }
index efd416508903e7b01d148c536eaae09de6f34a0a..985183bc023722236d217ce50d8a48c0f0a74b6f 100644 (file)
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.memory@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -20,12 +20,17 @@ cc_library_shared {
         "MemoryTest.cpp",
     ],
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
         "libhidlmemory",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "android.hardware.tests.memory@1.0",
         "android.hidl.memory@1.0",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.memory@1.0"],
 }
\ No newline at end of file
index a7a750a61f24b0c8973072c3d144c92cf180b2e2..a94ee3e1b85813e3da62f7c330ba2d41dd658890 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.multithread@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,10 +7,15 @@ cc_library_shared {
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "android.hardware.tests.multithread@1.0",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.multithread@1.0"],
 }
index 0c91edb11a4a80bb740dbf75e13376982ecb14bd..4825ac75a3d225226c555497e9227cbcadccea48 100644 (file)
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.pointer@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -11,12 +11,17 @@ cc_library_shared {
 
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "libpointertest",
         "liblog",
         "libutils",
-        "android.hardware.tests.pointer@1.0",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.pointer@1.0"],
+
 }
index ae07b046aff628d8e7f58319c5c1a5875dca6931..180906b9dd03e68ad5b2278ff95b3a20f67f759f 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "libpointertest",
     defaults: ["hidl_defaults"],
     srcs: [
@@ -10,8 +10,9 @@ cc_library_shared {
         "libhidlbase",
         "libhidltransport",
         "liblog",
-        "android.hardware.tests.pointer@1.0",
     ],
+    static_libs: ["android.hardware.tests.pointer@1.0"],
+
     local_include_dirs: ["include/hidl-test"],
     export_include_dirs: ["include"],
 
index 315c8bb826e5ec87e682419b87559be71cc263e9..948a8cbab41d0271a56fe20441fa96c1f42d51af 100644 (file)
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "android.hardware.tests.trie@1.0-impl",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,10 +7,15 @@ cc_library_shared {
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "android.hardware.tests.trie@1.0",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["android.hardware.tests.trie@1.0"],
 }