6 export LSAN_OPTIONS
=suppressions
=${abs_top_srcdir:-../../..}/src
/test
/rust_supp.txt
8 # When testing Cargo we pass a number of very specific linker flags down
9 # through Cargo. We do not, however, want these flags to affect things like
10 # build scripts, only the tests that we're compiling. To ensure this happens
11 # we unconditionally pass `--target` into Cargo, ensuring that `RUSTFLAGS` in
12 # the environment won't make their way into build scripts.
13 rustc_host
=$
(rustc
-vV |
grep host |
sed 's/host: //')
15 for cargo_toml_dir
in "${abs_top_srcdir:-../../..}"/src
/rust
/*; do
16 if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then
17 cd "${abs_top_builddir:-../../..}/src/rust" && \
18 CARGO_TARGET_DIR
="${abs_top_builddir:-../../..}/src/rust/target" \
19 "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \
20 --features "test_linking_hack" \
21 --target $rustc_host \
22 ${EXTRA_CARGO_OPTIONS} \
23 --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode
=1