#!/bin/sh # # This script expects one command line argument: The name of the lisp. # # # This is the general driver used by the testsuite to run tests by # "make check" in the tests directory. It gets processed by a # simple-minded sed script to fill in the lisp implementation etc # below and turns into -test.sh LOCAL_MAXIMA=@top_builddir@/maxima-local OUTPUT_LOG="$1.log" LISP=$1 # Die if a command fails set -e # This command doesn't exit with a helpful status if the lisp survives # but the test fails so we must check by hand that nothing untoward # happened. # # Before we run the testsuite we add the interactive tests and feed them # with input over a pipe. ...and we change the input for questions to # the lisp's standard input so it isn't taken from the keyboard even # if the current lisp defaults to that. echo "Running the testsuite..." $LOCAL_MAXIMA --lisp=$LISP --batch-string='build_info();testsuite_files:append(["rtest_ask.mac"],testsuite_files);run_testsuite(share_tests=true);' < @abs_top_srcdir@/tests/rtest_ask_input.mac 2>&1 | tee "$OUTPUT_LOG" grep -q 'No unexpected errors' <"$OUTPUT_LOG" if test $? -ne 0 ; then # We'll have another copy of the log from the output of this script, # so there's no point in leaving the greppable one lying around. rm "$OUTPUT_LOG" exit 1 fi; # We'll have another copy of the log from the output of this script, # so there's no point in leaving the greppable one lying around. rm "$OUTPUT_LOG"