3 # Run clocc's ansi-test suite on SBCL.
5 # This is implemented as a shell script because ansi-test likes to
6 # report its errors on standard output and it's convenient to use the
7 # *nix shell tools to extract them.
9 # clocc = Common Lisp Open Code Collection, available on
10 # <http://clocc.sourceforge.net/>
11 # ansi-test = one of the subdirectories in clocc, containing lotso tests
12 # for ANSI compliance (and the occasional test for CLISP
13 # compatibility too:-)
15 # This software is part of the SBCL system. See the README file for
18 # While most of SBCL is derived from the CMU CL system, the test
19 # files (like this one) were written from scratch after the fork
22 # This software is in the public domain and is provided with
23 # absolutely no warranty. See the COPYING and CREDITS files for
26 # Remember where we came from so we can find local support files later.
29 # Find clocc ansi-test (or just punt, returning success).
30 if [ "$SBCL_CLOCC_ANSI_TEST" = "" ] ; then
31 echo punting clocc ansi-test because SBCL_CLOCC_ANSI_TEST is undefined
34 cd $SBCL_CLOCC_ANSI_TEST
37 # The condition system is for the weak.
38 tmpprefix="${TMPDIR:-/tmp}/sbcl-clocc-ansi-test-$$"
39 rawfilename="$tmpprefix-raw.tmp"
40 bugsfilename="$tmpprefix-bugs.tmp"
43 $SBCL <<EOF | tee $rawfilename
45 ;;; Tell ansi-test about our known bugs.
46 (load "$originalpwd/clocc-ansi-test-known-bugs.lisp")
47 ;;; Actually run ansi-test.
49 ;;; Return a special status code to show that we reached the end
50 ;;; normally instead of taking a dirt nap.
51 (sb-ext:quit :unix-status 52)
54 echo "failure: SBCL didn't finish running clocc ansi-test."
58 # Klingon programmers detect errors by searching for error tags in
60 if egrep 'ERROR!!' $rawfilename > $bugsfilename; then
61 # new bugs, better luck next time
65 # only known bugs, happy happy joy joy
66 rm $rawfilename $bugsfilename