+(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 run-tests ()
+ (let ((specs (read-specs)))
+ (unless specs
+ (warn "Not running test because test configuration file is missing")
+ (return-from run-tests :skipped))
+ (mysql-low-level specs)
+ (with-tests (:name "CLSQL")
+ (dolist (db-type +all-db-types+)
+ (let ((spec (db-type-spec db-type specs)))
+ (when spec
+ (db-type-ensure-system db-type)
+ (ignore-errors (destroy-database spec db-type))
+ (ignore-errors (create-database spec db-type))
+ (test-table spec db-type))))))
+ t)