Skip to content

Commit ed90fbf

Browse files
committed
ci: Add timing info to test builds
To help determine where time is being spent in tests, add a 'time' command to the test invocation script. In addition, split the test invocation into a separate build and run stage. This can be useful with another change to ptest that logs all test outputs instead of just failures. Signed-off-by: David Brown <[email protected]>
1 parent 0cfe2ce commit ed90fbf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ci/sim_run.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ EXIT_CODE=0
2525
if [[ ! -z $SINGLE_FEATURES ]]; then
2626
if [[ $SINGLE_FEATURES =~ "none" ]]; then
2727
echo "Running cargo with no features"
28-
cargo test
28+
time cargo test --no-run
29+
time cargo test
2930
rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc
3031
fi
3132

3233
for feature in $all_features; do
3334
if [[ $SINGLE_FEATURES =~ $feature ]]; then
3435
echo "Running cargo for feature=\"${feature}\""
35-
cargo test --features $feature
36+
time cargo test --no-run --features $feature
37+
time cargo test --features $feature
3638
rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc
3739
fi
3840
done
@@ -43,7 +45,8 @@ if [[ ! -z $MULTI_FEATURES ]]; then
4345
read -ra multi_features <<< "$MULTI_FEATURES"
4446
for features in "${multi_features[@]}"; do
4547
echo "Running cargo for features=\"${features}\""
46-
cargo test --features "$features"
48+
time cargo test --no-run --features "$features"
49+
time cargo test --features "$features"
4750
rc=$? && [ $rc -ne 0 ] && EXIT_CODE=$rc
4851
done
4952
fi

0 commit comments

Comments
 (0)