summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/test-driver.scm.in28
1 files changed, 19 insertions, 9 deletions
diff --git a/build-aux/test-driver.scm.in b/build-aux/test-driver.scm.in
index 71aa042..89b9b68 100644
--- a/build-aux/test-driver.scm.in
+++ b/build-aux/test-driver.scm.in
@@ -1,5 +1,5 @@
;;; guile-email --- Guile email parser
-;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of guile-email.
;;;
@@ -31,8 +31,17 @@
(expect-failure (value #t))
(enable-hard-errors (value #t))))
-(define (my-gnu-runner trs-port)
+(define (my-gnu-runner log-port trs-port)
(let ((runner (test-runner-simple)))
+ (test-runner-on-group-begin! runner
+ (lambda (runner suite-name count)
+ (format #t "%%%% Starting test ~a~%" suite-name)
+ (format log-port "%%%% Starting test ~a~%" suite-name)
+ ;; Set log-port in the aux-value field for use by other parts
+ ;; of test-runner-simple
+ (test-runner-aux-value! runner log-port)
+ (format #t " (Writing full log to \"~a\")~%" (port-filename log-port))))
+ (test-runner-on-group-end! runner (const #f))
(test-runner-on-test-end! runner
(lambda (runner)
(format trs-port ":test-result: ~A ~A~%"
@@ -43,10 +52,11 @@
runner))
(let ((opts (getopt-long (command-line) %options)))
- (set! test-log-to-file (string-append "@abs_top_builddir@/"
- (option-ref opts 'log-file #f)))
- (call-with-output-file (option-ref opts 'trs-file #f)
- (lambda (trs-port)
- (chdir "@abs_top_srcdir@")
- (test-with-runner (my-gnu-runner trs-port)
- (load-from-path (option-ref opts 'test-name #f))))))
+ (call-with-output-file (string-append "@abs_top_builddir@/"
+ (option-ref opts 'log-file #f))
+ (lambda (log-port)
+ (call-with-output-file (option-ref opts 'trs-file #f)
+ (lambda (trs-port)
+ (chdir "@abs_top_srcdir@")
+ (test-with-runner (my-gnu-runner log-port trs-port)
+ (load-from-path (option-ref opts 'test-name #f))))))))