diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-14 12:49:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-14 12:50:26 -0400 |
commit | 945d871da54e6038fdabaf3b78a7a55b290ab6aa (patch) | |
tree | 1596091972d6977df83251c44a94ef8fa87b5143 /src | |
parent | ed7b13581234c0c1bbef3126f3dba5cd2892f950 (diff) | |
parent | 71065201dd6dcaf08238a2d09a604dfcdb4aa271 (diff) | |
download | tor-945d871da54e6038fdabaf3b78a7a55b290ab6aa.tar.gz tor-945d871da54e6038fdabaf3b78a7a55b290ab6aa.zip |
Merge branch 'maint-0.3.3'
Diffstat (limited to 'src')
-rw-r--r-- | src/test/include.am | 1 | ||||
-rwxr-xr-x | src/test/test_rust.sh | 24 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/test/include.am b/src/test/include.am index 48257467af..2ae598b224 100644 --- a/src/test/include.am +++ b/src/test/include.am @@ -9,6 +9,7 @@ TESTS_ENVIRONMENT = \ export builddir="$(builddir)"; \ export TESTING_TOR_BINARY="$(TESTING_TOR_BINARY)"; \ export CARGO="$(CARGO)"; \ + export EXTRA_CARGO_OPTIONS="$(EXTRA_CARGO_OPTIONS)"; \ export CARGO_ONLINE="$(CARGO_ONLINE)"; TESTSCRIPTS = \ diff --git a/src/test/test_rust.sh b/src/test/test_rust.sh index c35c57456f..8e8d29b895 100755 --- a/src/test/test_rust.sh +++ b/src/test/test_rust.sh @@ -3,12 +3,18 @@ set -e -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 '{}' \; - -exit $? + +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 + + |