2 # The Evaluator -- Master Control Script
3 # (c) 2001 Martin Mares <mj@ucw.cz>
6 if [ ! -f config -o ! -f bin/lib ] ; then
7 echo "Unable to find evaluator files!"
14 # HDIR home dir of the evaluator
15 # PDIR problem specific data
16 # SDIR contestant's solution
19 # PROBLEM problem we're evaluating
21 [ -n "$2" ] || die "Usage: ev <contestant> <problem> [<program>]"
35 for TEST in $TESTS ; do
37 [ -f $PDIR/$TEST.config ] && . $PDIR/$TEST.config
39 pstart "Test $TEST ($POINTS_PER_TEST points)... "
40 echo "Test $TEST ($POINTS_PER_TEST points)"
41 echo >>$PTSFILE -n "$TEST "
42 if [ ! -f $TDIR/$PROBLEM ] ; then
43 echo >$PTSFILE "0 Compile error."
44 die "No executable file"
47 syntax-check || exit 0
48 output-check || exit 0
49 echo "Test completed OK ($POINTS_PER_TEST points)"
50 echo >>$PTSFILE "$POINTS_PER_TEST OK"