From 1c398c263ca265d68504a7e79b99c6ea75e9a364 Mon Sep 17 00:00:00 2001 From: Timothy Sample Date: Thu, 22 Dec 2022 09:13:02 -0600 Subject: [PATCH] tests: Check for abnormal exits. * tests/run-test-suite.in (run-test): Check if the test exited abnormally. --- tests/run-test-suite.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run-test-suite.in b/tests/run-test-suite.in index 0fd98eb..02b5556 100644 --- a/tests/run-test-suite.in +++ b/tests/run-test-suite.in @@ -181,7 +181,7 @@ output, and standard error as three values." (catch #t (lambda () (receive (status stdout stderr) (observe shell script "test" args) - (let* ((status-ok? (= status xstatus)) + (let* ((status-ok? (and status (= status xstatus))) (stdout-ok? (or (not xstdout) (string=? stdout xstdout))) (stderr-ok? (or (not xstderr) (string=? stderr xstderr))) (ok? (and status-ok? stdout-ok? stderr-ok?)) @@ -190,7 +190,7 @@ output, and standard error as three values." (if xfail? 'xfail 'fail)))) (unless status-ok? (format #t "Expected status: ~a~%" xstatus) - (format #t "Actual status: ~a~%" status)) + (format #t "Actual status: ~a~%" (or status "abnormal"))) (unless stdout-ok? (display "Expected stdout: ") (display-output xstdout)