summaryrefslogtreecommitdiff
path: root/rust/test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2023-01-11 14:17:39 -0800
committer Colin Cross <ccross@android.com> 2023-01-11 16:04:19 -0800
commit225a37a7f06063d565627bbad6a8e3a87bcbb217 (patch)
treeaaf0c003b1a783b72b8c4d4a545049a5e192b55a /rust/test.go
parent57b1e4064be7b3a0976da7a5c474ebef9f65312d (diff)
Use the same rpaths for tests and binaries and cc and rust
Rust and cc binaries currently use $ORIGIN/lib64:$ORIGIN/../lib64 as the rpath, and cc tests add $ORIGIN/../../lib64:$ORIGIN/../../../$ORIGIN:$ORIGIN. This causes problems when a binary is included as test data in out/host/linux-x86/testcases/<test dir>/<CPU>/<test>, as the binaries can't find the libraries in out/host/linux-x86/lib64. Use the same rpath for test and binaries, and for cc and rust. Bug: 264604160 Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib && out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/gen_sdk_test/x86_64/gen_sdk_test && out/host/linux-x86/testcases/gen_sdk_test/x86_64/toybox Change-Id: I10fe5dc0de01d1f3c6aea8dbabbf60edab5989c3
Diffstat (limited to 'rust/test.go')
-rw-r--r--rust/test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/test.go b/rust/test.go
index 4f922b494..4b5296e54 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -200,6 +200,7 @@ func (test *testDecorator) compilerFlags(ctx ModuleContext, flags Flags) Flags {
if ctx.Device() {
flags.RustFlags = append(flags.RustFlags, "-Z panic_abort_tests")
}
+
return flags
}