aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorArun Isaac2019-10-09 13:11:54 +0530
committerArun Isaac2019-12-16 02:15:31 +0530
commit54e71be7b54189f8a99d083abd8809f5627a26ce (patch)
tree0a3b55cafc5809672ecfba92fec105483355bd0e /build-aux
parentf78072a713466469d0a1e0f93f7e96170a7e16fc (diff)
downloadguile-email-54e71be7b54189f8a99d083abd8809f5627a26ce.tar.gz
guile-email-54e71be7b54189f8a99d083abd8809f5627a26ce.tar.lz
guile-email-54e71be7b54189f8a99d083abd8809f5627a26ce.zip
tests: Log test results to stderr.
* build-aux/test-driver.scm.in (my-gnu-runner): Log colorized test results to stderr.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/test-driver.scm.in16
1 files changed, 10 insertions, 6 deletions
diff --git a/build-aux/test-driver.scm.in b/build-aux/test-driver.scm.in
index 89b9b68..96d84e0 100644
--- a/build-aux/test-driver.scm.in
+++ b/build-aux/test-driver.scm.in
@@ -17,7 +17,8 @@
;;; License along with guile-email. If not, see
;;; <http://www.gnu.org/licenses/>.
-(use-modules (ice-9 getopt-long)
+(use-modules (ice-9 format)
+ (ice-9 getopt-long)
(srfi srfi-26)
(srfi srfi-64))
@@ -44,11 +45,14 @@
(test-runner-on-group-end! runner (const #f))
(test-runner-on-test-end! runner
(lambda (runner)
- (format trs-port ":test-result: ~A ~A~%"
- (string-upcase
- (symbol->string
- (test-result-kind runner)))
- (test-runner-test-name runner))))
+ (let ((name (test-runner-test-name runner))
+ (result (string-upcase
+ (symbol->string (test-result-kind runner)))))
+ (format trs-port ":test-result: ~a ~a~%" result name)
+ (format (current-error-port)
+ "\x1b[~:[31~;32~]m~a\x1b[0m ~a~%"
+ (eq? (test-result-kind runner) 'pass)
+ result name))))
runner))
(let ((opts (getopt-long (command-line) %options)))