# The Evaluator -- Public Checking Script # (c) 2001 Martin Mares set -e [ -n "$MO_PUBLIC" -a -d "$MO_PUBLIC" ] || { echo >&2 "MO_PUBLIC not set, giving up." ; exit 1 ; } . $MO_PUBLIC/bin/lib . $MO_PUBLIC/config [ -n "$1" ] || die "Usage: check []" PROBLEM=$1 public-setup . $PDIR/config PTSFILE=$TDIR/points if [ -n "$OPEN_DATA_PROBLEM" ] ; then [ -n "$2" ] || die "You need to specify test number for open data problems." TEST=$2 open-locate pstart "Checking $TEST: " syntax-check pend "OK" else [ -z "$2" ] || die "No test number should be specified for normal problems." locate-source compile for TEST in $SAMPLE_TESTS ; do pstart "Checking on sample input $TEST: " test-run syntax-check output-check pend "OK" done fi