X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Frun-tests.sh;h=de63a75cffd934c1c65a71328a7011e51b41f95d;hb=7848e760d71ba19c6b69b636d12b7ebd28696bf8;hp=6ac24e8584f98521adc0f135391cb67f546dd34e;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 6ac24e8..de63a75 100644 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -3,22 +3,40 @@ # Run the regression tests in this directory. # how we invoke SBCL -sbcl=${1:-sbcl --noprint --noprogrammer} +sbcl=${1:-sbcl --noinform --noprint --noprogrammer} + +# "Ten four" is the closest numerical slang I can find to "OK", so +# it's the return value we expect from a successful test. +tenfour () { + if [ $? = 104 ]; then + echo ok + else + echo test failed: $? + return 1 + fi +} # *.pure.lisp files are ordinary Lisp code with no side effects, # and we can run them all in a single Lisp process. -(for f in *.pure.lisp; do echo \"$f\"; done) | $sbcl < pure.lisp +(for f in *.pure.lisp; do echo \"$f\"; done) | $sbcl ; tenfour # *.impure.lisp files are Lisp code with side effects (e.g. doing DEFSTRUCT # or DEFTYPE or DEFVAR). Each one needs to be run as a separate # invocation of Lisp. for f in *.impure.lisp; do - echo $f | $sbcl < pure.lisp + echo $f | $sbcl ; tenfour done -# *.test.sh files are scripts to test stuff. A file foo.test.sh +# *.test.sh files are scripts to test stuff, typically stuff which can't +# so easily be tested within Lisp itself. A file foo.test.sh # may be associated with other files foo*, e.g. foo.lisp, foo-1.lisp, # or foo.pl. for f in *.test.sh; do - sh $f + sh $f ; tenfour +done + +# *.assertoids files contain ASSERTOID statements to test things +# interpreted and at various compilation levels. +for f in *.assertoids; do + echo "(load \"$f\")" | $sbcl --eval '(load "assertoid.lisp")' ; tenfour done