2 # The Evaluator -- Master Control Script
3 # (c) 2001--2003 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... "
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 if [ -f $TDIR/$TEST.pts ] ; then
50 PTS=`cat $TDIR/$TEST.pts`
54 echo "Test completed OK ($PTS points)"
55 echo >>$PTSFILE "$PTS OK"
56 pend "OK, $PTS points"