Add help script to easily run all integration tests

This commit is contained in:
Michael Vines 2019-01-30 20:50:48 -08:00 committed by Grimes
parent 40acaee446
commit 21c09073a1
2 changed files with 20 additions and 11 deletions

19
ci/integration-tests.sh Executable file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Runs all integration tests in the tree serially
#
set -e
FEATURES="$1"
cd "$(dirname "$0")/.."
source ci/_
export RUST_BACKTRACE=1
for test in {,*/}tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
(
export RUST_LOG="$test"=trace,$RUST_LOG
_ cargo test --all --verbose --features="$FEATURES" --test="$test" \
-- --test-threads=1 --nocapture
)
done

View File

@ -1,8 +1,6 @@
#!/usr/bin/env bash
set -e
FEATURES="$1"
cd "$(dirname "$0")/.."
# Clear cached json keypair files
@ -27,15 +25,7 @@ for program in programs/native/*; do
)
done
# Run integration tests serially
OLD_RUST_LOG=$RUST_LOG
for test in {,*/}tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
export RUST_LOG="$test"=trace
_ cargo test --all --verbose --features="$FEATURES" --test="$test" -- --test-threads=1 --nocapture
done
RUST_LOG=$OLD_RUST_LOG
_ ci/integration-tests.sh "$FEATURES"
echo --- ci/localnet-sanity.sh
(