-(defun read-specs (&optional (path *config-pathname*))
- (if (probe-file path)
- (with-open-file (stream path :direction :input)
- (let ((config (read stream))
- (specs (make-instance 'conn-specs)))
- (setf (aodbc specs) (cadr (assoc :aodbc config)))
- (setf (mysql specs) (cadr (assoc :mysql config)))
- (setf (postgresql specs) (cadr (assoc :postgresql config)))
- (setf (postgresql-socket specs)
- (cadr (assoc :postgresql-socket config)))
- (setf (sqlite specs) (cadr (assoc :sqlite config)))
- specs))
- (progn
- (warn "CLSQL tester config file ~S not found" path)
- nil)))
+(defun do-tests-for-backend (spec db-type)
+ (format t
+ "~&
+*******************************************************************
+*** Running CLSQL tests with ~A backend.
+*******************************************************************
+" db-type)
+ (regression-test:rem-all-tests)
+
+ ;; Tests of clsql-base
+ (ignore-errors (destroy-database spec :database-type db-type))
+ (ignore-errors (create-database spec :database-type db-type))
+ (with-tests (:name "CLSQL")
+ (test-basic spec db-type))
+
+ (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*
+ *rt-ooddl* *rt-oodml* *rt-syntax*))
+ (eval test))
+ (test-connect-to-database db-type spec)
+ (test-initialise-database)
+ (rtest:do-tests))