]> mj.ucw.cz Git - eval.git/commitdiff
submit and check now respect per-task configuration files.
authorMartin Mares <mj@ucw.cz>
Tue, 3 Jul 2007 08:23:35 +0000 (10:23 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 3 Jul 2007 08:23:35 +0000 (10:23 +0200)
public/check
public/submit

index 95403a386f0539a4d2cadd67058bfbc275735b4b..51b627186acc3f5149338fdd7d50a4ceb7ed75d3 100755 (executable)
@@ -48,10 +48,11 @@ 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: "
+       [ -f $PDIR/$TEST.config ] && . $PDIR/$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"
@@ -60,6 +61,7 @@ else
        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
index 17add8dc711cb78536b06bb9e463ff0ed729a4e4..f597ee46b17eabf5ae1fdd5ab6067aeba06b3186 100755 (executable)
@@ -53,9 +53,10 @@ if [ $TASK_TYPE == open-data ] ; then
        pstart "Test case $TEST: "
        open-locate "$SRCFILE"
        (
+               [ -f $PDIR/$TEST.config ] && . $PDIR/$TEST.config
                try-ln "$SDIR/$SRCN" $TDIR/$TEST.out
                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."
@@ -64,6 +65,7 @@ else
        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