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
|
$genPipeline && return
|
||||||
ci/version-check-with-upgrade.sh stable
|
ci/version-check-with-upgrade.sh stable
|
||||||
_ scripts/ulimit-n.sh
|
_ scripts/ulimit-n.sh
|
||||||
FEATURES=""
|
_ cargo build --all
|
||||||
_ cargo build --all --features="$FEATURES"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
runTest() {
|
runTest() {
|
||||||
|
|
|
@ -12,8 +12,14 @@ export RUST_BACKTRACE=1
|
||||||
export RUSTFLAGS="-D warnings"
|
export RUSTFLAGS="-D warnings"
|
||||||
|
|
||||||
source scripts/ulimit-n.sh
|
source scripts/ulimit-n.sh
|
||||||
_ cargo build --all ${V:+--verbose} --features="$FEATURES"
|
maybeFeatures=
|
||||||
_ cargo test --all ${V:+--verbose} --features="$FEATURES" --lib -- --nocapture --test-threads=1
|
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)
|
# Run native program tests (without $FEATURES)
|
||||||
for program in programs/native/*; do
|
for program in programs/native/*; do
|
||||||
|
|
Loading…
Reference in New Issue