From ce375a71b010af6732b5aca522410f039369ee2f Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 23 Feb 2022 21:13:02 -0500 Subject: [PATCH] ci: Fix BFS tests comparison with zero skipped tests Now that -path/-ipath is implemented, no tests are skipped any more. Fix CI by using zero instead of the empty string, which breaks the compare_bfs_result.py script. --- util/build-bfs.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/build-bfs.sh b/util/build-bfs.sh index 375e3366..77f96582 100755 --- a/util/build-bfs.sh +++ b/util/build-bfs.sh @@ -26,6 +26,12 @@ LOG_FILE=bfs/tests.log PASS=$(sed -n "s/^tests passed: \(.*\)/\1/p" "$LOG_FILE" | head -n1) SKIP=$(sed -n "s/^tests skipped: \(.*\)/\1/p" "$LOG_FILE" | head -n1) FAIL=$(sed -n "s/^tests failed: \(.*\)/\1/p" "$LOG_FILE" | head -n1) + +# Default any missing numbers to zero (e.g. no tests skipped) +: ${PASS:=0} +: ${SKIP:=0} +: ${FAIL:=0} + TOTAL=$((PASS + SKIP + FAIL)) if (( TOTAL <= 1 )); then echo "Error in the execution, failing early"