From: Martin Mares Date: Sun, 1 Jul 2007 21:42:55 +0000 (+0200) Subject: Added a couple of debugging hacks (the EV_xxx variables). X-Git-Tag: python-dummy-working~322 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=6493c533ffbb60605df2c8cbbb0a3493f8431bba;p=moe.git Added a couple of debugging hacks (the EV_xxx variables). --- diff --git a/bin/ev b/bin/ev index 11876b5..8e46028 100755 --- 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 ea516f1..b912be7 100644 --- 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 " " + 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 " " 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 " " [ -f $PDIR/$TEST.out ] && ln $PDIR/$TEST.out $TDIR/$TEST.ok OCHECK=`eval echo $OUTPUT_CHECK` diff --git a/config b/config index d0c9449..768d52a 100644 --- 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