OSDN Git Service

Add runpath to lshal_test
authorJiyong Park <jiyong@google.com>
Wed, 13 Sep 2017 08:37:40 +0000 (17:37 +0900)
committerJiyong Park <jiyong@google.com>
Wed, 13 Sep 2017 08:37:40 +0000 (17:37 +0900)
android.hardware.test.baz@1.0.so is installed to /data/nativetest(64),
and no longer to /system/lib(64) or /system/lib(64)/vndk, because the
interface library is only for testing.

Set runpath so that lshal_test can find the interface library in the
non-standard directory.

Bug: 65603915
Test: m -j lshal_test
adb push out/target/product/<name>/data/nativetest* /data
adb shell /data/nativetest/lshal_test/lshal_test

Change-Id: I854b08acb6442990ed369bfbc517ad1a93c94584

cmds/lshal/Android.bp

index 67b5b46..8a64717 100644 (file)
@@ -61,6 +61,10 @@ cc_test {
     shared_libs: [
         "android.hardware.tests.baz@1.0"
     ],
+    ldflags: [
+        "-Wl,--rpath,${ORIGIN}/..",
+        "-Wl,--enable-new-dtags",
+    ],
     srcs: [
         "test.cpp"
     ]