projects
/
clsql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9eb9377
)
r8954: check for any errors and report
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 11 Apr 2004 12:38:35 +0000
(12:38 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Sun, 11 Apr 2004 12:38:35 +0000
(12:38 +0000)
tests/test-init.lisp
patch
|
blob
|
history
diff --git
a/tests/test-init.lisp
b/tests/test-init.lisp
index db217ecae06e1bffe78612affded35020a90e5d9..1d41ea78df83d46eeae17746f7701a62fac430d7 100644
(file)
--- a/
tests/test-init.lisp
+++ b/
tests/test-init.lisp
@@
-289,8
+289,11
@@
(clsql:update-records-from-instance employee10)
(clsql:update-records-from-instance company1))
(clsql:update-records-from-instance employee10)
(clsql:update-records-from-instance company1))
+(defvar *error-count* 0)
+
(defun run-tests ()
(defun run-tests ()
- (let ((specs (read-specs)))
+ (let ((specs (read-specs))
+ (*error-count* 0))
(unless specs
(warn "Not running tests because test configuration file is missing")
(return-from run-tests :skipped))
(unless specs
(warn "Not running tests because test configuration file is missing")
(return-from run-tests :skipped))
@@
-298,7
+301,8
@@
(dolist (db-type +all-db-types+)
(let ((spec (db-type-spec db-type specs)))
(when spec
(dolist (db-type +all-db-types+)
(let ((spec (db-type-spec db-type specs)))
(when spec
- (do-tests-for-backend spec db-type))))))
+ (do-tests-for-backend spec db-type))))
+ (zerop *error-count*)))
(defun load-necessary-systems (specs)
(dolist (db-type +all-db-types+)
(defun load-necessary-systems (specs)
(dolist (db-type +all-db-types+)
@@
-319,7
+323,8
@@
(ignore-errors (create-database spec :database-type db-type))
(with-tests (:name "CLSQL")
(test-basic spec db-type))
(ignore-errors (create-database spec :database-type db-type))
(with-tests (:name "CLSQL")
(test-basic spec db-type))
-
+ (incf *error-count* *test-errors*)
+
(ignore-errors (destroy-database spec :database-type db-type))
(ignore-errors (create-database spec :database-type db-type))
(dolist (test (append *rt-connection* *rt-fddl* *rt-fdml*
(ignore-errors (destroy-database spec :database-type db-type))
(ignore-errors (create-database spec :database-type db-type))
(dolist (test (append *rt-connection* *rt-fddl* *rt-fdml*
@@
-327,5
+332,8
@@
(eval test))
(test-connect-to-database db-type spec)
(test-initialise-database)
(eval test))
(test-connect-to-database db-type spec)
(test-initialise-database)
- (rtest:do-tests))
+ (let ((remaining (rtest:do-tests)))
+ (when (consp remaining)
+ (incf *error-count* (length remaining)))))
+