Permalink
Browse files

Output the test results as they happen

LIFT now outputs the outcome of each test-case as
it happens. The output is a single character in brief
mode and a word or phrases in regular verbosity.

Change-Id: I773c62ac0ca6b464e6ba9fb66852cff774a183e7
Reviewed-on: https://gerrit.franz.com:9080/1734
Reviewed-by: John O'Rourke <jor@franz.com>
Reviewed-by: Ahmon Dancy <dancy@franz.com>
Tested-by: Kevin Layer <layer@franz.com>
  • Loading branch information...
1 parent 8870688 commit 946f6e5f3aa6c695f1f88cb64ddb61fd50e11e27 Gary King committed with dklayer Oct 21, 2011
Showing with 57 additions and 0 deletions.
  1. +51 −0 dev/reports.lisp
  2. +6 −0 dev/test-runner.lisp
View
@@ -1168,3 +1168,54 @@ lift::(progn
(declare (ignore stream current-suite))
)
+;;;
+
+(defmethod result-summary-tag ((problem t) (style (eql :brief)))
+ ".")
+
+(defmethod result-summary-tag ((problem test-problem-mixin) (style (eql :brief)))
+ "P")
+
+(defmethod result-summary-tag ((problem test-failure-mixin) (style (eql :brief)))
+ "F")
+
+(defmethod result-summary-tag ((problem test-error-mixin) (style (eql :brief)))
+ "E")
+
+(defmethod result-summary-tag ((problem testsuite-serious-condition) (style (eql :brief)))
+ "X")
+
+(defmethod result-summary-tag ((problem test-serious-condition) (style (eql :brief)))
+ "x")
+
+(defmethod result-summary-tag ((problem test-expected-failure) (style (eql :brief)))
+ "f")
+
+(defmethod result-summary-tag ((problem test-expected-error) (style (eql :brief)))
+ "e")
+
+;;
+
+(defmethod result-summary-tag ((problem t) (style t))
+ "Pass")
+
+(defmethod result-summary-tag ((problem test-problem-mixin) (style t))
+ "Problem")
+
+(defmethod result-summary-tag ((problem test-failure-mixin) (style t))
+ "Fail")
+
+(defmethod result-summary-tag ((problem test-error-mixin) (style t))
+ "Error")
+
+(defmethod result-summary-tag ((problem testsuite-serious-condition) (style t))
+ "Serious error in test suite")
+
+(defmethod result-summary-tag ((problem test-serious-condition) (style t))
+ "Serious error in test")
+
+(defmethod result-summary-tag ((problem test-expected-failure) (style t))
+ "Expected failure")
+
+(defmethod result-summary-tag ((problem test-expected-error) (style t))
+ "Expected error")
View
@@ -256,6 +256,12 @@ nor configuration file options were specified.")))))
(let ((datum (list suite-name test-case-name (test-data suite))))
(cond ((null result-pushed?)
(setf result-pushed? t)
+ (when *test-print-test-case-names*
+ (when (not (eq *test-print-test-case-names* :brief))
+ (format *lift-debug-output* "~40T"))
+ (print-lift-message "~a"
+ (result-summary-tag (getf (test-data suite) :problem)
+ *test-print-test-case-names*)))
(push datum (tests-run result)))
(t
;; replace

0 comments on commit 946f6e5

Please sign in to comment.