Skip to content

Commit ca6fc0f

Browse files
committed
update
1 parent a371bf6 commit ca6fc0f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

ci/run.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,38 +224,40 @@ cargo check -p libm --no-default-features
224224

225225
if [ "${BUILD_ONLY:-}" = "1" ]; then
226226
# If we are on targets that can't run tests, verify that we can build.
227-
cmd=(cargo build --target $target --package libm)
227+
cmd=(cargo build --target "$target" --package libm)
228228
"${cmd[@]}"
229229
"${cmd[@]}" --features unstable-intrinsics
230230

231231
echo "can't run tests on $target; skipping"
232232
exit
233233
fi
234234

235-
flags+=($flags --all --target "$target")
235+
flags+=(--workspace --target "$target")
236236
cmd=(cargo test "${flags[@]}")
237237
profile="--profile"
238238

239239
# If nextest is available, use that
240240
command -v cargo-nextest && nextest=1 || nextest=0
241241
if [ "$nextest" = "1" ]; then
242+
cmd=(cargo nextest run)
243+
242244
# Workaround for https://github.com/nextest-rs/nextest/issues/2066
243245
if [ -f /.dockerenv ]; then
244-
cfg_file=(/tmp/nextest-config.toml)
246+
cfg_file=/tmp/nextest-config.toml
245247
echo "[store]" >> "$cfg_file"
246248
echo "dir = \"$CARGO_TARGET_DIR/nextest\"" >> "$cfg_file"
247-
cfg_flag=(--config-file $cfg_file)
249+
cmd+=(--config-file "$cfg_file")
248250
fi
249251

250-
cmd=(cargo nextest run ${cfg_flag:-} --max-fail=10 $flags)
252+
cmd+=(--max-fail=10 "${flags[@]}")
251253
profile="--cargo-profile"
252254
fi
253255

254256
# Test once without intrinsics
255257
"${cmd[@]}"
256258

257259
# Run doctests if they were excluded by nextest
258-
[ "$nextest" = "1" ] && cargo test --doc $flags
260+
[ "$nextest" = "1" ] && cargo test --doc "${flags[@]}"
259261

260262
# Exclude the macros and utile crates from the rest of the tests to save CI
261263
# runtime, they shouldn't have anything feature- or opt-level-dependent.

0 commit comments

Comments
 (0)