From 98e893c69bb9af77ee80cb22ba580c9d31f8866f Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Sat, 2 Feb 2019 11:07:18 -0800 Subject: [PATCH] Avoid empty --features= arg to avoid unnecessary cargo building --- ci/integration-tests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci/integration-tests.sh b/ci/integration-tests.sh index 605d7a6d74..d02861d9fb 100755 --- a/ci/integration-tests.sh +++ b/ci/integration-tests.sh @@ -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