From acb44aa94ff8753e94eee3a019f7c160eff4e988 Mon Sep 17 00:00:00 2001 From: Eitaro Fukamachi Date: Mon, 18 Mar 2019 17:58:51 +0900 Subject: [PATCH] Enable the default reporter at toplevel. --- main.lisp | 4 ++++ reporter.lisp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/main.lisp b/main.lisp index eb9ef31..688b420 100644 --- a/main.lisp +++ b/main.lisp @@ -27,6 +27,7 @@ (:import-from #:rove/core/result #:form-description) (:import-from #:rove/reporter + #:use-reporter #:with-reporter #:diag #:*report-stream*) @@ -96,3 +97,6 @@ (with-local-envs env (with-reporter style (run-system-tests target)))) + +;; Enable the default reporter +(use-reporter *default-reporter*) diff --git a/reporter.lisp b/reporter.lisp index 3d2780d..359151a 100644 --- a/reporter.lisp +++ b/reporter.lisp @@ -9,7 +9,8 @@ #:reporter-stream #:print-message #:diag - #:with-reporter)) + #:with-reporter + #:use-reporter)) (in-package #:rove/reporter) (defvar *report-stream* (make-synonym-stream '*standard-output*)) @@ -46,3 +47,6 @@ (append `((*stats* . ,*stats*)) bt:*default-special-bindings*))) ,@body)) + +(defun use-reporter (style) + (setf *stats* (make-reporter style)))