From ce90dc9bc00c46b27b437467bb2f053ab2307fbc Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 7 Nov 2023 13:09:21 -0500 Subject: tests: Fix output interleaving with -j1 --- tests/run.sh | 10 +++++----- 1 file 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 -- cgit v1.2.3