gpgscm: Print failed and skipped tests.
authorJustus Winter <justus@g10code.com>
Thu, 17 Nov 2016 12:12:38 +0000 (13:12 +0100)
committerJustus Winter <justus@g10code.com>
Tue, 13 Dec 2016 14:09:26 +0000 (15:09 +0100)
* tests/gpgscm/tests.scm (test-pool::report): Print failed and skipped
tests at the end.

Signed-off-by: Justus Winter <justus@g10code.com>
tests/gpgscm/tests.scm

index b5df9b7..7b8d489 100644 (file)
                           (= 99 p::retcode))))
                procs))
       (define (report)
-       (echo (length procs) "tests run,"
-             (length (passed)) "succeeded,"
-             (length (failed)) "failed,"
-             (length (skipped)) "skipped.")
-       (length (failed)))))))
+       (define (print-tests tests message)
+         (unless (null? tests)
+                 (apply echo (cons message
+                                   (map (lambda (t) t::name) tests)))))
+
+       (let ((failed' (failed)) (skipped' (skipped)))
+         (echo (length procs) "tests run,"
+               (length (passed)) "succeeded,"
+               (length failed') "failed,"
+               (length skipped') "skipped.")
+         (print-tests failed' "Failed tests:")
+         (print-tests skipped' "Skipped tests:")
+         (length failed')))))))
 
 (define (verbosity n)
   (if (= 0 n) '() (cons '--verbose (verbosity (- n 1)))))