]> mj.ucw.cz Git - moe.git/blobdiff - public/check
Install the configuration file of submitd at the right location.
[moe.git] / public / check
index 152884d2aaf674806a742552a5c129c84910f407..6a8012f2bcfefee60ab3c2c174d8cba91a867614 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # The Evaluator -- Public Checking Script
-# (c) 2001--2007 Martin Mares <mj@ucw.cz>
+# (c) 2001--2008 Martin Mares <mj@ucw.cz>
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
@@ -48,18 +48,20 @@ function test-verdict
 if [ $TASK_TYPE == open-data ] ; then
        [ -n "$TEST" ] || die "You need to specify test number for open data problems."
        pstart "Checking $TEST: "
-       open-locate $SRCFILE
-       ln $SRCN $TDIR/$TEST.out
+       test-config
+       open-locate "$SRCFILE"
+       try-ln "$SDIR/$SRCN" $TDIR/$TEST.out
        syntax-check
-       test-result 1 OK
+       test-result $POINTS_PER_TEST OK
 else
        [ -z "$TEST" ] || die "Test number should be given only for open data problems."
-       locate-source $SRCFILE
+       locate-source "$SRCFILE"
        compile
        RC=0
        for TEST in $SAMPLE_TESTS ; do
                (
                pstart "Checking on sample input $TEST: "
+               test-config
                test-run
                syntax-check
                output-check