diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-09 13:09:08 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-09 13:09:08 +0200 |
commit | 3bf6fcb24c3196adcb583f70b724ffed404d2dc1 (patch) | |
tree | 9d496ca37fd82e12d8e24c0d740e3f330b291814 /module | |
parent | Add coverage supplement for atomic-*. (diff) | |
download | calp-3bf6fcb24c3196adcb583f70b724ffed404d2dc1.tar.gz calp-3bf6fcb24c3196adcb583f70b724ffed404d2dc1.tar.xz |
Handle crashes in tests!
Unhandled exceptions thrown during tests are now caught, and properly
repported. This also allows the tests to run to completion, and print
their final summary (which I previously believed was broken when running
in multiple threads).
Also add --help flag to testrunner...
Diffstat (limited to '')
-rw-r--r-- | module/hnh/test/testrunner.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/module/hnh/test/testrunner.scm b/module/hnh/test/testrunner.scm index 38df0ee1..b3951c34 100644 --- a/module/hnh/test/testrunner.scm +++ b/module/hnh/test/testrunner.scm @@ -6,8 +6,8 @@ :use-module (ice-9 pretty-print) :use-module (ice-9 format) :use-module (ice-9 curried-definitions) - :export (verbose? construct-test-runner) - ) + :export (verbose? construct-test-runner + test-runner-test-name/description)) (define verbose? (make-parameter #f)) @@ -107,8 +107,12 @@ (with-output-to-string (lambda () (display - (red (format #f "Test failed: ~a~%" + (yellow (format #f "Test failed: ~a~%" (test-runner-test-name/description runner)))) + (display + (yellow + (format #f " Path: ~s~%" + (cdr (test-runner-group-path runner))))) (test-runner-describe-error runner 0))) err-queue)) |