Commit 9d4f1b24 authored by Daniel Barlow's avatar Daniel Barlow

test with both available implementations without having to edit this

file.  patches for other CL implementations gratefully accepted
parent 7265988e
#!/bin/sh
# This needs to
# - 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
#LISP="/usr/local/bin/lisp -batch "
LISP="sbcl --noprogrammer"
# file extension that $LISP uses for compiled files
FASL=fasl
#FASL=axpf
rm *.$FASL || true
function do_tests {
rm *.$2 || true
( cd .. && echo '(compile-file "asdf")' |$1 )
for i in *.script;
do
rm *.$FASL || true
if $LISP < $i ;then
echo "$i passed"
rm *.$2 || true
if $1 < $i ;then
echo "Using $1, $i passed" >&2
else
echo "$i failed"
echo "Using $1, $i failed" >&2
exit 1
fi
done
echo "All tests apparently successful"
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
do_tests "sbcl --noprogrammer" fasl
fi
if [ -x /usr/local/bin/lisp ]
then
do_tests "/usr/local/bin/lisp -batch" axpf
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment