2 # The Evaluator -- Public Checking Script
3 # (c) 2001--2008 Martin Mares <mj@ucw.cz>
6 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
12 die "Usage: check [-s <source-file>] <problem> [<test-number>]"
16 while getopts "s:" opt ; do
48 if [ $TASK_TYPE == open-data ] ; then
49 [ -n "$TEST" ] || die "You need to specify test number for open data problems."
50 pstart "Checking $TEST: "
52 open-locate "$SRCFILE"
53 try-ln "$SDIR/$SRCN" $TDIR/$TEST.out
55 test-result $POINTS_PER_TEST OK
57 [ -z "$TEST" ] || die "Test number should be given only for open data problems."
58 locate-source "$SRCFILE"
61 for TEST in $SAMPLE_TESTS ; do
63 pstart "Checking on sample input $TEST: "