diff options
Diffstat (limited to 'test/run-tests.sh')
| -rwxr-xr-x | test/run-tests.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/run-tests.sh b/test/run-tests.sh index c8869d8..85bbf03 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -64,19 +64,26 @@ test-abstraction-db-roundtrip.sh" PASSED=0 FAILED=0 RESULTS="" +LOG="${TMPDIR:-/tmp}/spine-run-tests.$$" for t in $TESTS; do printf '%s\n' "── $t" - if sh "$SCRIPT_DIR/$t" $SPINE_BIN 2>&1 | sed 's/^/ /'; then + # the status has to be the test's, not the last command of a pipeline: + # "cmd | sed" reports sed's status, which is always 0, and a harness that + # cannot fail is worse than no harness + if sh "$SCRIPT_DIR/$t" $SPINE_BIN > "$LOG" 2>&1; then + sed 's/^/ /' "$LOG" PASSED=$((PASSED + 1)) RESULTS="$RESULTS ok $t" else + sed 's/^/ /' "$LOG" FAILED=$((FAILED + 1)) RESULTS="$RESULTS FAIL $t" fi done +rm -f "$LOG" echo "" echo "summary:$RESULTS" |
