]> mj.ucw.cz Git - moe.git/commitdiff
Added a couple of debugging hacks (the EV_xxx variables).
authorMartin Mares <mj@ucw.cz>
Sun, 1 Jul 2007 21:42:55 +0000 (23:42 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 1 Jul 2007 21:42:55 +0000 (23:42 +0200)
bin/ev
bin/lib
config

diff --git a/bin/ev b/bin/ev
index 11876b5a02431f3d33a0ae02aa6b6567f8dd5b77..8e46028c30d3b50a193575b39a253ac69c19b603 100755 (executable)
--- a/bin/ev
+++ b/bin/ev
@@ -38,6 +38,7 @@ function test-verdict
 }
 
 # Perform the tests
+[ -z "$EV_SAMPLE" ] || TESTS="$SAMPLE_TESTS $TESTS"
 for TEST in $TESTS ; do
        (
        [ -f $PDIR/$TEST.config ] && . $PDIR/$TEST.config
diff --git a/bin/lib b/bin/lib
index ea516f17ede8cf3c42a6d6be7361d1eb2cf50e2f..b912be78b49eb3dd7d80079838faf8188d82391d 100644 (file)
--- a/bin/lib
+++ b/bin/lib
@@ -241,6 +241,10 @@ function test-prolog
                *)      die "Unknown IN_TYPE $IN_TYPE"
                        ;;
        esac
+       if [ -n "$EV_PEDANT" -a $IN_TYPE != none ] ; then
+               pcont "<pedant> "
+               bin/pedant <$TDIR/$TEST.in | tr '\n' ' ' >&2
+       fi
        case $OUT_TYPE in
                file)   echo "Output file: $PROBLEM.out"
                        [ $TASK_TYPE == interactive ] || BOX_EXTRAS="$BOX_EXTRAS -o/dev/null"
@@ -315,6 +319,7 @@ function test-run-interactive
 function syntax-check
 {
        [ -n "$SYNTAX_CHECK" ] || return 0
+       [ -z "$EV_NOCHECK" ] || return 0
        pcont "<syntax> "
        SCHECK=`eval echo $SYNTAX_CHECK`
        echo "Syntax check command: $SCHECK"
@@ -332,7 +337,7 @@ function syntax-check
 function output-check
 {
        MSG=
-       if [ -n "$OUTPUT_CHECK" -a "$OUT_TYPE" != none ] ; then
+       if [ -n "$OUTPUT_CHECK" -a "$OUT_TYPE" != none -a -z "$EV_NOCHECK" ] ; then
                pcont "<check> "
                [ -f $PDIR/$TEST.out ] && ln $PDIR/$TEST.out $TDIR/$TEST.ok
                OCHECK=`eval echo $OUTPUT_CHECK`
diff --git a/config b/config
index d0c94492a5872b1e2b43b05a177a9df5576bfe84..768d52a526d8104266b0baa6341ebecf4816b410 100644 (file)
--- a/config
+++ b/config
@@ -129,3 +129,12 @@ TEST_SANDBOX_OPTS='-a2 -f -m$MEM_LIMIT -t$TIME_LIMIT'
 
 # Sandbox initialization commands
 SANDBOX_INIT=
+
+# DEBUG: Let `ev' run sample tests, too.
+#EV_SAMPLE=1
+
+# DEBUG: Run `pedant' on all input data
+#EV_PEDANT=1
+
+# DEBUG: Skip checks (useful when generating output files by running model solution)
+#EV_NOCHECK=1