Commit 2faa816f authored by Raymond Toy's avatar Raymond Toy
Browse files

Have run-tests run a lisp file to run the tests.

run-test.lisp does the necessary things to setup and run the
testsuite.
parent 2b55592a
......@@ -82,17 +82,25 @@
(defmethod perform ((op test-op) (c (eql (asdf:find-system :oct))))
(oos 'test-op 'oct-tests))
(asdf:defsystem rt
:components
((:module "rt"
:components
((:file "rt-package")
(:file "rt")))))
(asdf:defsystem oct/tests
:depends-on (oct)
:depends-on (oct rt)
:version "2013.11.26" ; Just use the date
:in-order-to ((compile-op (load-op :rt))
(load-op (load-op :rt))
(test-op (load-op :rt :oct)))
:components
((:file "qd-extra")
(:file "qd-test")
(:file "rt-tests")))
(defmethod perform ((op test-op) (c (eql (asdf:find-system :oct/tests))))
(or (funcall (intern "DO-TESTS" (find-package "RT")))
(error "TEST-OP failed for OCT-TESTS")))
(let* ((rt-package (find-package "RT"))
(pass (funcall (intern "DO-TESTS" rt-package)))
(unexpected-failures (symbol-value (find-symbol "*UNEXPECTED-FAILURES*" rt-package)))
(unexpected-successes (symbol-value (find-symbol "*UNEXPECTED-SUCCESSES*" rt-package))))
(or (and (null unexpected-failures) (null unexpected-successes))
(error "TEST-OP failed for OCT-TESTS"))))
(require :asdf)
(pushnew "./" asdf:*central-registry*)
(require :oct)
(asdf:oos 'asdf:load-op :oct :force t )
(dribble "test.log")
(asdf:oos 'asdf:test-op :oct/tests :force t)
#!/bin/bash
./bin/lisp -batch -eval '(require :asdf)' -load "rt-20101006-git/rt.asd" -eval "(asdf:oos 'asdf:load-op :rt)" -load "oct.asd" -eval "(asdf:oos 'asdf:test-op :oct-tests :force t)"
LISP=./bin/lisp
usage () {
echo "run-tests [-h?] [-l lisp]"
echo " -l lisp Lisp to use for the tests; defaults to ./bin/lisp"
echo " -? This help"
echo " -h This help"
exit 0;
}
while getopts "h?l:" arg
do
case $arg in
l) LISP=$OPTARG ;;
h) usage ;;
\?) usage ;;
esac
done
$LISP -batch -load "run-test.lisp"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment