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