X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Futils.lisp;h=f73edbc39e6afa37823695cdb8c6c41a2f4a0e76;hb=e02d79979cb676b5e8d96b16456922afe77f4f74;hp=6b5d38e64606fe4406e1703801b81e52c2c4dabb;hpb=86440ca219f801a087ad917d1c1f46c77c920aa4;p=clsql.git diff --git a/tests/utils.lisp b/tests/utils.lisp index 6b5d38e..f73edbc 100644 --- a/tests/utils.lisp +++ b/tests/utils.lisp @@ -24,7 +24,7 @@ :type "config")) (defvar +all-db-types+ - #-clisp '(:postgresql :postgresql-socket :sqlite :mysql :odbc + #-clisp '(:postgresql :postgresql-socket :mysql :sqlite :odbc #+allegro :aodbc) #+clisp '(:sqlite)) @@ -66,3 +66,36 @@ (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, ~A).~&" + (db-title db-type underlying-db-type) + (length failed-tests) + total-tests + machine-type + impl-type) + (format output "~&~A: All ~D tests passed (~A, ~A).~%" + (db-title db-type underlying-db-type) + total-tests + machine-type + impl-type))))))))