Files
mercury/tests/benchmarks/runtests
Zoltan Somogyi 564d358da3 Avoid about half of the slow "mmake realclean"s required by a bootcheck.
Estimated hours taken: 0.5

Avoid about half of the slow "mmake realclean"s required by a bootcheck.

tests/*/runtests:
	Concentrate all the actions performed before the test and after
	a successful tests (both of which involve an "mmake realclean")
	into two scripts, tests/{startup,shutdown}.

tests/shutdown:
	Clean up the directory, and touch the file CLEAN.

tests/startup:
	If the file CLEAN exists and is the most recent file in the directory,
	consider the directory clean to beging with. Otherwise, run mmake
	realclean.
1998-05-13 04:06:38 +00:00

37 lines
991 B
Bash
Executable File

#!/bin/sh
# Test whether the code generated by the Mercury compiler is producing
# the same output as code generated by the NU-Prolog compiler.
# Return a status of 0 (true) if everything is all right, and 1 otherwise.
#
# The .exp files containing the expected output of each test should be under
# CVS control. They can be updated by running
#
# mmake realclean
# mmake depend
# mmake exp
#
# on a machine that has NU-Prolog installed.
. ../handle_options
. ../startup
mmake $jfactor depend || exit 1
eval mmake -k $jfactor $gradeopt $flagsopt $cflagsopt check
checkstatus=$?
cat *.res > .allres
if test ! -s .allres -a "$checkstatus" = 0
then
echo "the tests in the benchmark directory succeeded"
echo "gradeopt=$gradeopt, flagsopt=$flagsopt, cflagsopt=$cflagsopt"
rm -f .allres
. ../shutdown
exit 0
else
echo "the tests in the benchmark directory failed"
echo "gradeopt=$gradeopt, flagsopt=$flagsopt, cflagsopt=$cflagsopt"
echo "the differences are:"
cat .allres
exit 1
fi