Avoid empty --features= arg to avoid unnecessary cargo building
This commit is contained in:
parent
eb3ba5ce2d
commit
6317bec7aa
|
@ -26,8 +26,7 @@ build() {
|
|||
$genPipeline && return
|
||||
ci/version-check-with-upgrade.sh stable
|
||||
_ scripts/ulimit-n.sh
|
||||
FEATURES=""
|
||||
_ cargo build --all --features="$FEATURES"
|
||||
_ cargo build --all
|
||||
}
|
||||
|
||||
runTest() {
|
||||
|
|
|
@ -12,8 +12,14 @@ export RUST_BACKTRACE=1
|
|||
export RUSTFLAGS="-D warnings"
|
||||
|
||||
source scripts/ulimit-n.sh
|
||||
_ cargo build --all ${V:+--verbose} --features="$FEATURES"
|
||||
_ cargo test --all ${V:+--verbose} --features="$FEATURES" --lib -- --nocapture --test-threads=1
|
||||
maybeFeatures=
|
||||
if [[ -n $FEATURES ]]; then
|
||||
maybeFeatures="--features=$FEATURES"
|
||||
fi
|
||||
# shellcheck disable=SC2086 # Don't want to double quote $maybeFeatures
|
||||
_ cargo build --all ${V:+--verbose} $maybeFeatures
|
||||
# shellcheck disable=SC2086 # Don't want to double quote $maybeFeatures
|
||||
_ cargo test --all ${V:+--verbose} $maybeFeatures --lib -- --nocapture --test-threads=1
|
||||
|
||||
# Run native program tests (without $FEATURES)
|
||||
for program in programs/native/*; do
|
||||
|
|
Loading…
Reference in New Issue