Skip to content

Commit

Permalink
ci: Fix BFS tests comparison with zero skipped tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tavianator committed Feb 24, 2022
1 parent 016995f commit ce375a7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions util/build-bfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ce375a7

Please sign in to comment.