diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-13 12:21:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-13 12:21:25 -0400 |
commit | ee860b8f37707cf60daae21b806d4d473daaf2d2 (patch) | |
tree | 408a75936fee3d50af85be484e909691a53d6377 /src/test/test_rust.sh | |
parent | 9d06c41c6e69e25a68639a09b22baa7de3299fa9 (diff) | |
download | tor-ee860b8f37707cf60daae21b806d4d473daaf2d2.tar.gz tor-ee860b8f37707cf60daae21b806d4d473daaf2d2.zip |
squash! Make sure that the test_rust.sh script fails when a test fails
Also make sure that we're actually running the test from within the right
cwd, like we do when we're building. This seems necessary to avoid
an error when running offline.
Amusingly, it appears that we had this bug before: we just weren't
noticing it, because of bug 26258.
Diffstat (limited to 'src/test/test_rust.sh')
-rwxr-xr-x | src/test/test_rust.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index 854582ec17..8e8d29b895 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -4,11 +4,15 @@ set -e -for cargo_toml in "${abs_top_srcdir:-../../..}"/src/rust/*/Cargo.toml; do - CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ - CARGO_HOME="${abs_top_builddir:-../../..}/src/rust" \ - "${CARGO:-cargo}" test --all-features ${CARGO_ONLINE-"--frozen"} \ - --manifest-path "$cargo_toml" || exitcode=1 +for cargo_toml_dir in "${abs_top_srcdir:-../../..}"/src/rust/*; do + if [ -e "${cargo_toml_dir}/Cargo.toml" ]; then + cd "${cargo_toml_dir}" && \ + CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ + CARGO_HOME="${abs_top_builddir:-../../..}/src/rust" \ + "${CARGO:-cargo}" test --all-features ${CARGO_ONLINE:-"--frozen"} \ + ${EXTRA_CARGO_OPTIONS} \ + --manifest-path "${cargo_toml_dir}/Cargo.toml" || exitcode=1 + fi done exit $exitcode |