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
30 # 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
41 # The condition system is for the weak.
42 tmpprefix="${TMPDIR:-/tmp}/sbcl-clocc-ansi-test-$$"
43 rawfilename="$tmpprefix-raw.tmp"
44 bugsfilename="$tmpprefix-bugs.tmp"
47 run_sbcl <<EOF >$rawfilename
49 ;;; Tell ansi-test about our known bugs.
50 (load "$SBCL_PWD/clocc-ansi-test-known-bugs.lisp")
51 ;;; Actually run ansi-test.
53 ;;; Return a special status code to show that we reached the end
54 ;;; normally instead of taking a dirt nap.
55 (print "back from ansi-test tests.lisp")
56 (sb-ext:quit :unix-status 52)
59 echo "failure: SBCL didn't finish running clocc ansi-test."
63 # Klingon programmers handle errors by recognizing error strings
65 if egrep 'ERROR!!' $rawfilename > $bugsfilename; then
66 # new bugs, better luck next time
70 # only known bugs, happy happy joy joy
71 rm $rawfilename $bugsfilename