X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Futils.lisp;fp=tests%2Futils.lisp;h=f6f4e5170366359461bc616907e25e0d0c98535a;hp=7225b3ebe09626fc741851b3bcf05c1bb2bfc554;hb=967266c94b00f91e5967b8330fe2b9134b0c0447;hpb=cc92d162f24648d65ad872098353305a5baf91d7 diff --git a/tests/utils.lisp b/tests/utils.lisp index 7225b3e..f6f4e51 100644 --- a/tests/utils.lisp +++ b/tests/utils.lisp @@ -66,3 +66,34 @@ (symbol-name db-type)))))) + +(defun summarize-test-report (sexp &optional (output *standard-output*)) + (flet ((db-title (db-type underlying-db-type) + (format nil "~A~A" + db-type + (if (eq db-type underlying-db-type) + "" + (format nil "/~A" underlying-db-type))))) + (with-open-file (in sexp :direction :input) + (let ((eof (cons nil nil))) + (do ((form (read in nil eof) (read in nil eof))) + ((eq form eof)) + (destructuring-bind (db-type + underlying-db-type + utime + total-tests + failed-tests + impl-type + impl-version + machine-type) + form + (if failed-tests + (format output "~&~A: ~D of ~D tests failed (~A).~&" + (db-title db-type underlying-db-type) + (length failed-tests) + total-tests + impl-type) + (format output "~&~A: All ~D tests passed (~A).~%" + (db-title db-type underlying-db-type) + total-tests + impl-type))))))))