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.
29 sbclstem=`pwd`/../src/runtime/sbcl
30 SBCL="$sbclstem --core `pwd`/../output/sbcl.core --noinform --sysinit /dev/null --userinit /dev/null --noprint --disable-debugger"
32 echo /running tests on SBCL=\'$SBCL\'
33 # more or less like SBCL, but without enough grot removed that appending
34 # a --core command line argument works
36 # (KLUDGE: and also without any magic to suppress --userinit and
37 # --sysinit, so if you use it in a test, you need to add those
38 # yourself if you want things to be clean. If many tests start using
39 # this, we can redo it as a shell function or something so that the
40 # magic can be done once and only once.). Not used in this file, but
41 # exists for the benefit of the *.test.sh files that can be started by
43 SBCL_ALLOWING_CORE=$sbclstem
44 export SBCL_ALLOWING_CORE
45 echo /with SBCL_ALLOWING_CORE=\'$SBCL_ALLOWING_CORE\'
52 # "Ten four" is the closest numerical slang I can find to "OK", so
53 # it's the Unix status value that we expect from a successful test.
54 # (Of course, zero is the usual success value, but we don't want to
55 # use that because SBCL returns that by default, so we might think
56 # we passed a test when in fact some error caused us to exit SBCL
57 # in a weird unexpected way. In contrast, 104 is unlikely to be
58 # returned unless we exit through the intended explicit "test
64 echo test $2 failed, expected 104 return code, got $1
69 $SBCL --eval '(with-compilation-unit () (load "run-tests.lisp"))' \
70 --eval '(run-tests::run-all)' $*
74 echo '//apparent success (reached end of run-tests.sh normally)'