From d96e657d6ff26eb89754b98b47f91ebb605830b0 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 1 Jun 2004 22:29:23 +0000 Subject: [PATCH] Pick the _last_ line of stderr as the status line and log everything. --- bin/lib | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/lib b/bin/lib index c83367f..7eed64e 100644 --- a/bin/lib +++ b/bin/lib @@ -250,7 +250,8 @@ function test-run-file BOXOPTS="`eval echo $TEST_SANDBOX_OPTS`$BOX_EXTRAS" echo "Sandbox options: $BOXOPTS" if ! $BOXCMD $BOXOPTS -- ./$PROBLEM 2>$TMPDIR/exec.out ; then - MSG=`head -1 $TMPDIR/exec.out` + cat $TMPDIR/exec.out + MSG=`tail -1 $TMPDIR/exec.out` test-result 0 "$MSG" fi cat $TMPDIR/exec.out @@ -268,7 +269,8 @@ function test-run-interactive ICCMD=`eval echo $IA_CHECK` echo "Interactive checker: $ICCMD" if ! $HDIR/bin/iwrapper $BOXCMD $BOXOPTS -- ./$PROBLEM @@ $ICCMD 2>$TMPDIR/exec.out ; then - MSG="`head -1 $TMPDIR/exec.out`" + cat $TMPDIR/exec.out + MSG="`tail -1 $TMPDIR/exec.out`" test-result 0 "$MSG" fi cat $TMPDIR/exec.out @@ -284,7 +286,8 @@ function syntax-check SCHECK=`eval echo $SYNTAX_CHECK` echo "Syntax check command: $SCHECK" if ! eval $SCHECK 2>$TMPDIR/exec.out ; then - MSG=`head -1 $TMPDIR/exec.out` + cat $TMPDIR/exec.out + MSG=`tail -1 $TMPDIR/exec.out` if [ -z "$MSG" ] ; then MSG="Wrong syntax." ; fi test-result 0 "$MSG" fi @@ -301,11 +304,13 @@ function output-check OCHECK=`eval echo $OUTPUT_CHECK` echo "Output check command: $OCHECK" if ! eval $OCHECK 2>$TMPDIR/exec.out ; then - MSG=`head -1 $TMPDIR/exec.out` + cat $TMPDIR/exec.out + MSG=`tail -1 $TMPDIR/exec.out` if [ -z "$MSG" ] ; then MSG="Wrong answer." ; fi test-result 0 "$MSG" fi - MSG=`head -1 $TMPDIR/exec.out` + cat $TMPDIR/exec.out + MSG=`tail -1 $TMPDIR/exec.out` if [ -z "$MSG" ] ; then MSG="OK" ; fi test-result $POINTS_PER_TEST "$MSG" } -- 2.39.2