Windows installer: Update help text for the maxima_longnames program.
[maxima/cygwin.git] / tests / test.sh.in
blob1df76f8029e0c2266099493f39ef31def2513cbe
1 #!/bin/sh
3 # This script expects one command line argument: The name of the lisp.
6 # This is the general driver used by the testsuite to run tests by
7 # "make check" in the tests directory. It gets processed by a
8 # simple-minded sed script to fill in the lisp implementation etc
9 # below and turns into <lispname>-test.sh
11 LOCAL_MAXIMA=@top_builddir@/maxima-local
12 OUTPUT_LOG="$1.log"
13 OUTPUT_SHARE_LOG="$1_share.log"
14 LISP=$1
16 # Die if a command fails
17 set -e
19 # This command doesn't exit with a helpful status if the lisp survives
20 # but the test fails so we must check by hand that nothing untoward
21 # happened.
23 # Before we run the testsuite we add the interactive tests and feed them
24 # with input over a pipe. ...and we change the input for questions to
25 # the lisp's standard input so it isn't taken from the keyboard even
26 # if the current lisp defaults to that.
27 echo "Running the share testsuite..."
28 $LOCAL_MAXIMA --lisp=$LISP --batch-string='build_info();run_testsuite(share_tests=only);' 2>&1 | tee "$OUTPUT_SHARE_LOG"
29 echo "Running the testsuite for the maxima core..."
30 $LOCAL_MAXIMA --lisp=$LISP --batch-string='build_info();testsuite_files:append(["rtest_ask.mac"],testsuite_files);run_testsuite();' < @abs_top_srcdir@/tests/rtest_ask_input.mac 2>&1 | tee "$OUTPUT_LOG"
32 grep -q 'No unexpected errors' <"$OUTPUT_LOG"
33 if test $? -ne 0 ; then
34 # We'll have another copy of the log from the output of this script,
35 # so there's no point in leaving the greppable one lying around.
36 rm "$OUTPUT_LOG"
37 rm "$OUTPUT_SHARE_LOG"
38 exit 1
39 fi;
41 grep -q 'No unexpected errors' <"$OUTPUT_SHARE_LOG"
43 # We'll have another copy of the log from the output of this script,
44 # so there's no point in leaving the greppable one lying around.
45 rm "$OUTPUT_LOG"
46 rm "$OUTPUT_SHARE_LOG"