diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-07 13:09:21 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-07 13:09:21 -0500 |
commit | ce90dc9bc00c46b27b437467bb2f053ab2307fbc (patch) | |
tree | 807e40cc635ce9c282476a3381cb6bbbe4ab689a | |
parent | 31aadf6b6ffdcf9cef6c92d139d52e580938d1d4 (diff) | |
download | bfs-ce90dc9bc00c46b27b437467bb2f053ab2307fbc.tar.xz |
tests: Fix output interleaving with -j1
-rw-r--r-- | tests/run.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/run.sh b/tests/run.sh index f93cb4b..8f0a8fc 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -124,17 +124,17 @@ run_tests() { set +e for TEST in "${TEST_CASES[@]}"; do + if ((BG >= JOBS)); then + wait_test + fi + printf "$TEST_FMT" "$TEST" mkdir -p "$TMP/$TEST" OUT="$TMP/$TEST.out" - if ((BG >= JOBS)); then - wait_test - fi - ((++BG)) - bg_test "$TESTS/$TEST.sh" & + ((++BG)) done while ((BG > 0)); do |