Avoid empty --features= arg to avoid unnecessary cargo building

This commit is contained in:
Michael Vines 2019-02-02 11:07:18 -08:00
parent fea480526b
commit 98e893c69b
1 changed files with 7 additions and 2 deletions

View File

@ -3,7 +3,11 @@
# Runs all integration tests in the tree serially
#
set -e
FEATURES="$1"
maybeFeatures=
if [[ -n $1 ]]; then
maybeFeatures="--features=$1"
fi
cd "$(dirname "$0")/.."
source ci/_
export RUST_BACKTRACE=1
@ -14,7 +18,8 @@ for test in {,*/}tests/*.rs; do
test=${test%.rs} # basename x .rs
(
export RUST_LOG="$test"=trace,$RUST_LOG
_ cargo test --all --verbose --features="$FEATURES" --test="$test" \
# shellcheck disable=SC2086 # Don't want to double quote $maybeFeatures
_ cargo test --all --verbose $maybeFeatures --test="$test" \
-- --test-threads=1 --nocapture
)
done