From 26f109377ed6b835573f85904561c3d809850919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 28 Jun 2022 09:44:26 +0200 Subject: Tests '--skip'-flag now uses test names. This allows us both to (as before) skip complete files, as every file is run with its own name as a test group, but also individual tests and test group inside files. See GitHub issue #57 --- tests/run-tests.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/run-tests.scm b/tests/run-tests.scm index 919fc5b5..656d84b4 100755 --- a/tests/run-tests.scm +++ b/tests/run-tests.scm @@ -199,8 +199,6 @@ fi (awhen (option-ref options 'only #f) (set! files (list (path-append "test" it)))) -(awhen (option-ref options 'skip #f) - (set! files (delete it files))) ((@ (hnh util exceptions) warnings-are-errors) #t) @@ -234,8 +232,14 @@ fi (proc)) (test-begin "suite") + +(awhen (option-ref options 'skip #f) + (format #t "Skipping ~s~%" it) + (test-skip it)) + (finalizer (lambda () (for-each (lambda (f) (catch/print-trace (lambda () (test-group f (load f))))) files))) + (test-end "suite") (newline) -- cgit v1.2.3