diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-31 17:15:57 -0700 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-31 17:15:57 -0700 |
commit | 9d06c41c6e69e25a68639a09b22baa7de3299fa9 (patch) | |
tree | b673dda1315faea12176ed6322cc7e91c3ef4862 /src/test | |
parent | fa1890e97f19a444f8103c1207d7d18c02887b1f (diff) | |
download | tor-9d06c41c6e69e25a68639a09b22baa7de3299fa9.tar.gz tor-9d06c41c6e69e25a68639a09b22baa7de3299fa9.zip |
Make sure that the test_rust.sh script fails when a test fails
Exit codes from find(1) seem not to be so reliable as we had hoped.
Closes ticket 26258; bugfix on 0.3.3.4-alpha when we fixed #25560
Diffstat (limited to 'src/test')
-rwxr-xr-x | src/test/test_rust.sh | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index d87336e700..854582ec17 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -3,13 +3,14 @@ set -e -CARGO_TARGET_DIR="${abs_top_builddir:-../../..}/src/rust/target" \ + +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" \ - find "${abs_top_srcdir:-../../..}/src/rust" \ - -mindepth 2 -maxdepth 2 \ - -type f -name 'Cargo.toml' \ - -exec "${CARGO:-cargo}" test --all-features ${CARGO_ONLINE-"--frozen"} \ - --manifest-path '{}' \; + "${CARGO:-cargo}" test --all-features ${CARGO_ONLINE-"--frozen"} \ + --manifest-path "$cargo_toml" || exitcode=1 +done + +exit $exitcode -exit $? |