Skip to content

Commit

Permalink
Prevent NUM_TESTS_QUEUED from becoming negative.
Browse files Browse the repository at this point in the history
  • Loading branch information
marshall-mcmullen committed Oct 28, 2024
1 parent d421775 commit 31ba2dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion share/etest/runners.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,11 @@ run_single_test()
echo -n "${einfo_message}" &>>${ETEST_OUT}
einfo_message_length=$(echo -n "${einfo_message}" | noansi | wc -c)

decrement NUM_TESTS_QUEUED
increment NUM_TESTS_EXECUTED
decrement NUM_TESTS_QUEUED
if [[ ${NUM_TESTS_QUEUED} -lt 0 ]]; then
NUM_TESTS_QUEUED=0
fi

local suite
if [[ -n "${source}" ]]; then
Expand Down Expand Up @@ -322,6 +325,7 @@ run_all_tests()
else
NUM_TESTS_RUNNING=1
__run_all_tests_serially
NUM_TESTS_RUNNING=0
fi
}

Expand Down

0 comments on commit 31ba2dc

Please sign in to comment.