X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Futils.lisp;h=1928bf4207e60b664b0382583aa370987d4e2e0e;hb=f716bb1161cf9e89a96945c4a444244f9d303691;hp=7225b3ebe09626fc741851b3bcf05c1bb2bfc554;hpb=cc92d162f24648d65ad872098353305a5baf91d7;p=clsql.git diff --git a/tests/utils.lisp b/tests/utils.lisp index 7225b3e..1928bf4 100644 --- a/tests/utils.lisp +++ b/tests/utils.lisp @@ -58,11 +58,36 @@ (defun db-type-spec (db-type specs) (funcall (spec-fn db-type) specs)) -(defun db-type-ensure-system (db-type) - (unless (find-package (symbol-name db-type)) - (asdf:operate 'asdf:load-op - (intern (concatenate 'string - (symbol-name '#:clsql-) - (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))))))))