]> mj.ucw.cz Git - moe.git/blobdiff - public/submit
Added configuration file for libucw modules.
[moe.git] / public / submit
index c642218e11d22e6299438cde36d54a3747aed4e6..f597ee46b17eabf5ae1fdd5ab6067aeba06b3186 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # The Evaluator -- Public Submit Script
 #!/bin/bash
 # The Evaluator -- Public Submit Script
-# (c) 2001--2004 Martin Mares <mj@ucw.cz>
+# (c) 2001--2007 Martin Mares <mj@ucw.cz>
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
 
 set -e
 [ -n "$MO_ROOT" -a -d "$MO_ROOT" ] || { echo >&2 "MO_ROOT not set, giving up." ; exit 1 ; }
@@ -53,9 +53,10 @@ if [ $TASK_TYPE == open-data ] ; then
        pstart "Test case $TEST: "
        open-locate "$SRCFILE"
        (
        pstart "Test case $TEST: "
        open-locate "$SRCFILE"
        (
-               ln "$SDIR/$SRCN" $TDIR/$TEST.out
+               [ -f $PDIR/$TEST.config ] && . $PDIR/$TEST.config
+               try-ln "$SDIR/$SRCN" $TDIR/$TEST.out
                syntax-check
                syntax-check
-               test-result 1 OK
+               test-result $POINTS_PER_TEST OK
        ) || FAILED=1
 else
        [ -z "$PART" ] || die "Test number should be given only for open data problems."
        ) || FAILED=1
 else
        [ -z "$PART" ] || die "Test number should be given only for open data problems."
@@ -64,6 +65,7 @@ else
        for TEST in $SAMPLE_TESTS ; do
                (
                pstart "Checking on sample input $TEST: "
        for TEST in $SAMPLE_TESTS ; do
                (
                pstart "Checking on sample input $TEST: "
+               [ -f $PDIR/$TEST.config ] && . $PDIR/$TEST.config
                test-run
                syntax-check
                output-check
                test-run
                syntax-check
                output-check