X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Ftest-init.lisp;h=964849c0466c5f80a244a763135db642005767d8;hb=6e8ef7161f2d2759bf8d78740e7e93bea5eca781;hp=0f4180ab4d3d301a459e8f2bc57ac78851f5e017;hpb=cd64aa8907160d3a2c2d0e531c831f1db44c7a61;p=clsql.git diff --git a/tests/test-init.lisp b/tests/test-init.lisp index 0f4180a..964849c 100644 --- a/tests/test-init.lisp +++ b/tests/test-init.lisp @@ -7,6 +7,11 @@ ;;;; ;;;; Initialisation utilities for running regression tests on CLSQL. ;;;; +;;;; This file is part of CLSQL. +;;;; +;;;; CLSQL users are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. ;;;; ====================================================================== (in-package #:clsql-tests) @@ -17,6 +22,7 @@ (defvar *rt-ooddl*) (defvar *rt-oodml*) (defvar *rt-syntax*) +(defvar *rt-time*) (defvar *test-database-type* nil) (defvar *test-database-user* nil) @@ -124,12 +130,6 @@ :make-default t :if-exists :old)) -(defmacro with-ignore-errors (&rest forms) - `(progn - ,@(mapcar - (lambda (x) (list 'ignore-errors x)) - forms))) - (defparameter company1 nil) (defparameter employee1 nil) (defparameter employee2 nil) @@ -143,10 +143,10 @@ (defparameter employee10 nil) (defun test-initialise-database () - ;; Create the tables for our view classes - (ignore-errors - (clsql:drop-view-from-class 'employee) - (clsql:drop-view-from-class 'company)) + ;; Remove the tables to support cases when destroy-database isn't supported, like odbc + (ignore-errors (clsql:drop-table "EMPLOYEE")) + (ignore-errors (clsql:drop-table "COMPANY")) + (ignore-errors (clsql:drop-table "FOO")) (clsql:create-view-from-class 'employee) (clsql:create-view-from-class 'company) @@ -321,6 +321,7 @@ (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))