Remove duplication between test-stable{,-perf}.sh

This commit is contained in:
Michael Vines
2018-12-18 13:12:44 -08:00
parent 0d2e3788ba
commit cd6736d70b
2 changed files with 18 additions and 52 deletions

View File

@ -1,9 +1,14 @@
#!/usr/bin/env bash
set -e
FEATURES="$1"
cd "$(dirname "$0")/.."
ci/version-check.sh stable
# Clear cached json keypair files
rm -rf "$HOME/.config/solana"
ci/version-check-with-upgrade.sh stable
export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"
@ -13,19 +18,12 @@ _() {
}
_ scripts/ulimit-n.sh
_ cargo build --all --verbose
_ cargo test --all --verbose --lib -- --nocapture --test-threads=1
_ cargo build --all --verbose --features="$FEATURES"
_ cargo test --all --verbose - --features="$FEATURES" --lib -- --nocapture --test-threads=1
# Run integration tests serially
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --test="$test" -- --test-threads=1 --nocapture
done
# Run native program tests
# Run native program tests (without $FEATURES)
for program in programs/native/*; do
echo --- "$program"
echo --- "$program" test
(
set -x
cd "$program"
@ -33,6 +31,13 @@ for program in programs/native/*; do
)
done
# Run integration tests serially
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --features="$FEATURES" --test="$test" -- --test-threads=1 --nocapture
done
echo --- ci/localnet-sanity.sh
(
set -x