(when (and *dataset-debug-on-error*
*debugger-hook*)
(invoke-debugger e))
- (print e *error-output*)
+ (fresh-line *error-output*)
+ (princ e *error-output*)
(throw 'quit-dataset e))
(defmacro def-dataset (name &body body)
(retry-dataset-init ()
:report ,(format nil "Retry dataset('~a) init: (with any dataset changes)"
(symbol-name name))
- (%dataset-init ,name)))
+ (%dataset-init ,name))
+ (skip-this-test ()
+ :report "FAIL and run the next test"
+ (throw 'quit-dataset :data-set-failure)))
,@body)
(%dataset-cleanup ,name))))
(defun %dataset-init (name)
"Run initialization code and fill database for given dataset."
- (handler-bind
- ((error #'generic-error))
- ;;find items that looks like '(:setup ...),
+ ;;find items that looks like '(:setup ...),
;; dispatch the rest.
(let ((setup (rest (find :setup name :key #'first)))
(sqldata (rest (find :sqldata name :key #'first)))
;;presumed to be view-class objects, force them to insert.
(dolist (o objdata)
(setf (slot-value o 'clsql-sys::view-database) nil)
- (clsql-sys:update-records-from-instance o))))))
+ (clsql-sys:update-records-from-instance o)))))
(defun %dataset-cleanup (name)
"Run cleanup code associated with the given dataset."