Add runpath to lshal_test
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
diff --git a/cmds/lshal/Android.bp b/cmds/lshal/Android.bp
index 67b5b46..8a64717 100644
--- a/cmds/lshal/Android.bp
+++ b/cmds/lshal/Android.bp
@@ -61,6 +61,10 @@
shared_libs: [
"android.hardware.tests.baz@1.0"
],
+ ldflags: [
+ "-Wl,--rpath,${ORIGIN}/..",
+ "-Wl,--enable-new-dtags",
+ ],
srcs: [
"test.cpp"
]