3 # Run the regression tests in this directory.
5 # Usage: run-tests.sh [--break-on-failure] [--break-on-expected-failure] [files]
6 # --break-on-failure Break into the debugger when a test fails
8 # --break-on-expected-failure Break into the debugger when any test fails
10 # If no test files are specified, runs all tests.
12 # This software is part of the SBCL system. See the README file for
15 # While most of SBCL is derived from the CMU CL system, the test
16 # files (like this one) were written from scratch after the fork
19 # This software is in the public domain and is provided with
20 # absolutely no warranty. See the COPYING and CREDITS files for
23 # how we invoke SBCL in the tests
25 # Until sbcl-0.6.12.8, the shell variable SBCL was bound to a relative
26 # pathname, but now we take care to bind it to an absolute pathname (still
27 # generated relative to `pwd` in the tests/ directory) so that tests
28 # can chdir before invoking SBCL and still work.
32 SBCL_HOME
=$SBCL_PWD/..
/contrib
34 sbclstem
=$SBCL_PWD/..
/src
/runtime
/sbcl
36 SBCL
="$sbclstem --core $SBCL_PWD/../output/sbcl.core --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger"
38 echo /running tests on SBCL
=\'$SBCL\'
39 # more or less like SBCL, but without enough grot removed that appending
40 # a --core command line argument works
42 # (KLUDGE: and also without any magic to suppress --userinit and
43 # --sysinit, so if you use it in a test, you need to add those
44 # yourself if you want things to be clean. If many tests start using
45 # this, we can redo it as a shell function or something so that the
46 # magic can be done once and only once.). Not used in this file, but
47 # exists for the benefit of the *.test.sh files that can be started by
49 SBCL_ALLOWING_CORE
=$sbclstem
50 export SBCL_ALLOWING_CORE
51 echo /with SBCL_ALLOWING_CORE
=\'$SBCL_ALLOWING_CORE\'
58 # "Ten four" is the closest numerical slang I can find to "OK", so
59 # it's the Unix status value that we expect from a successful test.
60 # (Of course, zero is the usual success value, but we don't want to
61 # use that because SBCL returns that by default, so we might think
62 # we passed a test when in fact some error caused us to exit SBCL
63 # in a weird unexpected way. In contrast, 104 is unlikely to be
64 # returned unless we exit through the intended explicit "test
70 echo test $2 failed
, expected
104 return code
, got
$1
75 $SBCL --eval '(with-compilation-unit () (load "run-tests.lisp"))' \
76 --eval '(run-tests::run-all)' $
*
80 echo '//apparent success (reached end of run-tests.sh normally)'