test_rust.sh 583 B

12345678910111213141516171819
  1. #!/bin/sh
  2. # Test all Rust crates
  3. set -e
  4. export LSAN_OPTIONS=suppressions=${abs_top_srcdir}/src/test/rust_supp.txt
  5. for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do
  6. if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then
  7. cd "${cargo_toml_dir}" && \
  8. CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \
  9. CARGO_HOME="${abs_top_builddir:-../../..}/src/rust/.cargo" \
  10. "${CARGO:-cargo}" test ${CARGO_ONLINE-"--frozen"} \
  11. ${EXTRA_CARGO_OPTIONS} \
  12. --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode=1
  13. fi
  14. done
  15. exit $exitcode