Add --help to run-tests.sh.
[sbcl.git] / tests / run-tests.sh
1 #!/bin/sh
2
3 # This software is part of the SBCL system. See the README file for
4 # more information.
5 #
6 # While most of SBCL is derived from the CMU CL system, the test
7 # files (like this one) were written from scratch after the fork
8 # from CMU CL.
9 #
10 # This software is in the public domain and is provided with
11 # absolutely no warranty. See the COPYING and CREDITS files for
12 # more information.
13
14 if [ $1 = "--help" ]; then
15     cat <<EOF
16 Run the regression tests in this directory.
17
18 Usage: $0 [OPTIONS] [files]
19
20 Options:
21
22   --break-on-failure            Break into the debugger when a test fails
23                                 unexpectedly
24   --break-on-expected-failure   Break into the debugger when any test fails
25   --report-skipped-tests        Include tests :skipped-on target SBCL in
26                                 the test report.
27   --no-color                    Disable coloring of results. 
28
29 If no test files are specified, runs all tests.
30 EOF
31     exit 0
32 fi
33
34
35 . ./subr.sh
36
37 echo /running tests on \'$SBCL_RUNTIME --core $SBCL_CORE $SBCL_ARGS\'
38
39 tenfour () {
40     if [ $1 = $EXIT_TEST_WIN ]; then
41         echo ok
42     else
43         echo test failed, expected $EXIT_TEST_WIN return code, got $1
44         exit 1
45     fi
46 }
47 set +u
48 run_sbcl \
49     --eval '(with-compilation-unit () (load "run-tests.lisp"))' \
50     --eval '(run-tests::run-all)' $*
51
52 tenfour $?
53
54 echo '//apparent success (reached end of run-tests.sh normally)'
55 date