change permissions
[clsql/s11.git] / examples / run-tests.sh
blobacfb7678319b252e96e9b1b8f28642ee6508c87e
1 #!/bin/bash
3 REPORT_FILE=/tmp/clsql-test-report.txt
4 SEXP_REPORT_FILE=/tmp/clsql-test-report.sexp
5 LISP_CMD_FILE=/tmp/clsql-test.lisp
7 CMD="
8 (setq *print-readably* nil)
9 (let ((boot-file
10 (merge-pathnames
11 (parse-namestring #+allegro \".clinit.cl\"
12 #+cmu \".cmucl-init.lisp\"
13 #+lispworks \".lispworks\"
14 #+openmcl \"openmcl-init.lisp\"
15 #+sbcl \".sbclrc\"
16 #+scl \".scl-init.lisp\"
18 (user-homedir-pathname))))
19 (if (probe-file boot-file)
20 (load boot-file)
21 (warn \"Unable to load boot file ~A.\" boot-file)))
23 (asdf:operate 'asdf:load-op 'clsql-tests)
24 (clsql-tests:run-tests-append-report-file \"${REPORT_FILE}\")
26 #+allegro (excl:exit)
27 #+clisp (#+lisp=cl ext:quit #-lisp=cl lisp:quit)
28 #+cmu (ext:quit)
29 #+lispworks (lw:quit)
30 #+openmcl (ccl:quit)
31 #+sbcl (sb-ext:quit)
32 #+scl (ext:quit)"
34 SUMMARY_CMD="
35 (asdf:operate 'asdf:load-op 'clsql-tests)
36 (clsql-tests:summarize-test-report \"${SEXP_REPORT_FILE}\")
38 #+allegro (excl:exit :quiet t)
39 #+clisp (#+lisp=cl ext:quit #-lisp=cl lisp:quit)
40 #+cmu (ext:quit)
41 #+lispworks (lw:quit)
42 #+openmcl (ccl:quit)
43 #+sbcl (sb-ext:quit))
44 #+scl (ext:quit)"
46 rm -rf $REPORT_FILE $SEXP_REPORT_FILE $LISP_CMD_FILE
47 echo $CMD > $LISP_CMD_FILE
49 ALLEGRO=mlisp
50 if [ "`which $ALLEGRO`" ]; then
51 $ALLEGRO -q -L $LISP_CMD_FILE
54 CMUCL=lisp
55 if [ "`which $CMUCL`" ]; then
56 $CMUCL -init $LISP_CMD_FILE
59 LISPWORKS=lw-console
60 #if [ "`which $LISPWORKS`" ]; then
61 $LISPWORKS -init $LISP_CMD_FILE
62 #fi
64 OPENCML=openmcl
65 #if [ "`which $OPENMCL`" ]; then
66 $OPENMCL -init $LISP_CMD_FILE
67 #fi
69 SBCL=sbcl
70 if [ "`which $SBCL`" ]; then
71 $SBCL --noinform --disable-debugger --userinit $LISP_CMD_FILE
74 if [ -s $SEXP_REPORT_FILE ]; then
75 echo "$SUMMARY_CMD" | $SBCL
78 #rm -rf $LISP_CMD_FILE