Static link test lib shims with test -impl libs.

* 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
diff --git a/tests/bar/1.0/default/Android.bp b/tests/bar/1.0/default/Android.bp
index 82d34a9..8aa6135 100644
--- a/tests/bar/1.0/default/Android.bp
+++ b/tests/bar/1.0/default/Android.bp
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -14,10 +14,15 @@
         "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: [
         "[email protected]",
         "[email protected]",
     ],
-
 }
diff --git a/tests/baz/1.0/default/Android.bp b/tests/baz/1.0/default/Android.bp
index f247b83..492e0b4 100644
--- a/tests/baz/1.0/default/Android.bp
+++ b/tests/baz/1.0/default/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,9 +7,15 @@
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
+        "liblog",
         "libutils",
-        "[email protected]",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
 }
diff --git a/tests/foo/1.0/default/Android.bp b/tests/foo/1.0/default/Android.bp
index 0e1d34d..d9dfc69 100644
--- a/tests/foo/1.0/default/Android.bp
+++ b/tests/foo/1.0/default/Android.bp
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -11,12 +11,16 @@
     shared_libs: [
         "libbase",
         "libcutils",
+        "libfootest",
         "libhidlbase",
         "libhidltransport",
-        "libfootest",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "[email protected]",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
+
 }
diff --git a/tests/foo/1.0/default/lib/Android.bp b/tests/foo/1.0/default/lib/Android.bp
index 895582c..2cc96c5 100644
--- a/tests/foo/1.0/default/lib/Android.bp
+++ b/tests/foo/1.0/default/lib/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "libfootest",
     defaults: ["hidl_defaults"],
     srcs: [
@@ -6,10 +6,14 @@
     ],
 
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
-        "[email protected]",
+        "libhwbinder",
+        "liblog",
     ],
+    static_libs: ["[email protected]"],
+
     local_include_dirs: ["include/hidl-test"],
     export_include_dirs: ["include"],
 
diff --git a/tests/hash/1.0/default/Android.bp b/tests/hash/1.0/default/Android.bp
index 67f9097..6e6d6a8 100644
--- a/tests/hash/1.0/default/Android.bp
+++ b/tests/hash/1.0/default/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -6,9 +6,15 @@
         "Hash.cpp",
     ],
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
+        "liblog",
         "libutils",
-        "[email protected]",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
 }
diff --git a/tests/inheritance/1.0/default/Android.bp b/tests/inheritance/1.0/default/Android.bp
index 158da4b..891355b 100644
--- a/tests/inheritance/1.0/default/Android.bp
+++ b/tests/inheritance/1.0/default/Android.bp
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -12,11 +12,16 @@
 
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "[email protected]",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
+
 }
diff --git a/tests/memory/1.0/default/Android.bp b/tests/memory/1.0/default/Android.bp
index efd4165..985183b 100644
--- a/tests/memory/1.0/default/Android.bp
+++ b/tests/memory/1.0/default/Android.bp
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -20,12 +20,17 @@
         "MemoryTest.cpp",
     ],
     shared_libs: [
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
         "libhidlmemory",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "[email protected]",
         "[email protected]",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
 }
\ No newline at end of file
diff --git a/tests/multithread/1.0/default/Android.bp b/tests/multithread/1.0/default/Android.bp
index a7a750a..a94ee3e 100644
--- a/tests/multithread/1.0/default/Android.bp
+++ b/tests/multithread/1.0/default/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,10 +7,15 @@
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "[email protected]",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
 }
diff --git a/tests/pointer/1.0/default/Android.bp b/tests/pointer/1.0/default/Android.bp
index 0c91edb..4825ac7 100644
--- a/tests/pointer/1.0/default/Android.bp
+++ b/tests/pointer/1.0/default/Android.bp
@@ -1,6 +1,6 @@
 
 
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -11,12 +11,17 @@
 
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "libpointertest",
         "liblog",
         "libutils",
-        "[email protected]",
     ],
 
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
+
 }
diff --git a/tests/pointer/1.0/default/lib/Android.bp b/tests/pointer/1.0/default/lib/Android.bp
index ae07b04..180906b 100644
--- a/tests/pointer/1.0/default/lib/Android.bp
+++ b/tests/pointer/1.0/default/lib/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "libpointertest",
     defaults: ["hidl_defaults"],
     srcs: [
@@ -10,8 +10,9 @@
         "libhidlbase",
         "libhidltransport",
         "liblog",
-        "[email protected]",
     ],
+    static_libs: ["[email protected]"],
+
     local_include_dirs: ["include/hidl-test"],
     export_include_dirs: ["include"],
 
diff --git a/tests/trie/1.0/default/Android.bp b/tests/trie/1.0/default/Android.bp
index 315c8bb..948a8cb 100644
--- a/tests/trie/1.0/default/Android.bp
+++ b/tests/trie/1.0/default/Android.bp
@@ -1,4 +1,4 @@
-cc_library_shared {
+cc_library {
     name: "[email protected]",
     defaults: ["hidl_defaults"],
     relative_install_path: "hw",
@@ -7,10 +7,15 @@
     ],
     shared_libs: [
         "libbase",
+        "libcutils",
         "libhidlbase",
         "libhidltransport",
+        "libhwbinder",
         "liblog",
         "libutils",
-        "[email protected]",
     ],
+
+    // These are static libs only for testing purposes and portability. Shared
+    // libs should be used on device.
+    static_libs: ["[email protected]"],
 }