run-tests.sh 781 Bytes
Newer Older
Daniel Barlow's avatar
Daniel Barlow committed
1 2
#!/bin/sh

3
do_tests() {
4 5
rm *.$2 || true
( cd .. && echo '(compile-file "asdf")' |$1  )
Daniel Barlow's avatar
Daniel Barlow committed
6 7
for i in *.script; 
do 
8 9 10
  rm *.$2 || true
  if $1 < $i ;then
    echo "Using $1, $i passed" >&2
Daniel Barlow's avatar
Daniel Barlow committed
11
  else
12
    echo "Using $1, $i failed" >&2
Daniel Barlow's avatar
Daniel Barlow committed
13 14 15
    exit 1
  fi
done
16 17 18 19 20 21 22 23 24 25 26 27
echo "Using $1, all tests apparently successful" >&2
}

# do_tests {lisp invocation} {fasl extension}
# - read lisp forms one at a time from standard input
# - quit with exit status 0 on getting eof
# - quit with exit status >0 if an unhandled error occurs

set -e

if type sbcl 
then 
Daniel Barlow's avatar
Daniel Barlow committed
28
  do_tests "sbcl --userinit /dev/null --sysinit /dev/null --noprogrammer" fasl 
29 30
fi

31
if [ -x /usr/bin/lisp ]
32
then 
Daniel Barlow's avatar
Daniel Barlow committed
33
  do_tests "/usr/bin/lisp -batch -noinit" x86f
34 35 36 37
fi

if [ -x /usr/bin/clisp ]
then 
38
  do_tests "/usr/bin/clisp -norc -ansi -I - " fas
39
fi