3 # Run clocc's ansi-test suite on SBCL (if you set the appropriate
4 # environment variable so that the test suite, a separate piece of
5 # software, can be found).
7 # This is implemented as a shell script because ansi-test likes to
8 # report its errors on standard output and it's convenient to use the
9 # *nix shell tools to extract them.
11 # clocc = Common Lisp Open Code Collection, available on
12 # <http://clocc.sourceforge.net/>
13 # ansi-test = one of the subdirectories in clocc, containing lotso tests
14 # for ANSI compliance (and the occasional test for CLISP
15 # compatibility too:-)
17 # This software is part of the SBCL system. See the README file for
20 # While most of SBCL is derived from the CMU CL system, the test
21 # files (like this one) were written from scratch after the fork
24 # This software is in the public domain and is provided with
25 # absolutely no warranty. See the COPYING and CREDITS files for
28 # Remember where we came from so we can find local support files later.
31 # Find clocc ansi-test (or just punt, returning success).
32 if [ "$SBCL_CLOCC_ANSI_TEST" = "" ] ; then
33 echo //punting clocc ansi-test because SBCL_CLOCC_ANSI_TEST is undefined
36 echo //going on to run clocc ansi-test
in $SBCL_CLOCC_ANSI_TEST
37 cd $SBCL_CLOCC_ANSI_TEST
40 # The condition system is for the weak.
41 tmpprefix
="${TMPDIR:-/tmp}/sbcl-clocc-ansi-test-$$"
42 rawfilename
="$tmpprefix-raw.tmp"
43 bugsfilename
="$tmpprefix-bugs.tmp"
46 $SBCL <<EOF >$rawfilename
48 ;;; Tell ansi-test about our known bugs.
49 (load "$originalpwd/clocc-ansi-test-known-bugs.lisp")
50 ;;; Actually run ansi-test.
52 ;;; Return a special status code to show that we reached the end
53 ;;; normally instead of taking a dirt nap.
54 (print "back from ansi-test tests.lisp")
55 (sb-ext:quit :unix-status 52)
58 echo "failure: SBCL didn't finish running clocc ansi-test."
62 # Klingon programmers handle errors by recognizing error strings
64 if egrep 'ERROR!!' $rawfilename > $bugsfilename; then
65 # new bugs, better luck next time
69 # only known bugs, happy happy joy joy
70 rm $rawfilename $bugsfilename