tests: Check for abnormal exits.

* tests/run-test-suite.in (run-test): Check if the test exited
abnormally.
This commit is contained in:
Timothy Sample 2022-12-22 09:13:02 -06:00
parent b643ac2355
commit 1c398c263c
1 changed files with 2 additions and 2 deletions

View File

@ -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)