X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=eval%2Flibeval.sh;h=676dbef399f3b6ea2ddd5df1029ef95c747b694c;hb=41ffdd8c7e534f484eb8e8e825cb9bc2dee8719e;hp=d3d0e96b0093826b15dfb9c135aa0477848d9cc1;hpb=9eeb7ab35587b487750b27aa8df001e21fc3272c;p=moe.git diff --git a/eval/libeval.sh b/eval/libeval.sh index d3d0e96..676dbef 100644 --- a/eval/libeval.sh +++ b/eval/libeval.sh @@ -263,14 +263,14 @@ function test-result SG=${M#Caught fatal signal } SG=${SG#Committed suicide by signal } if [ "$SG" != "$M" ] ; then - SG=`perl -MConfig -e '@s=split / /,$Config{sig_name}; print $s[$ARGV[0]]' $SG` + SG=`kill -l $SG 2>/dev/null` || SG= [ -z "$SG" ] || M="$M (SIG$SG)" fi # Translate runtime errors to readable strings RE=${M#Exited with error status } if [ -n "$EXIT_CODE_HOOK" -a "$RE" != "$M" ] ; then - NEWMSG=`$EXIT_CODE_HOOK $RE` + NEWMSG=`$EXIT_CODE_HOOK $RE` || NEWMSG= if [ -n "$NEWMSG" ] ; then M="Runtime error $RE: $NEWMSG" fi @@ -430,7 +430,7 @@ function test-run-interactive function test-run-open-data { [ -f $SDIR/$TEST.out ] || test-result 0 "No solution" - ln $SDIR/$TEST.out $TDIR/$TEST.out + try-ln $SDIR/$TEST.out $TDIR/$TEST.out } # Syntax checks @@ -458,7 +458,7 @@ function output-check MSG= 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 + [ -f $PDIR/$TEST.out ] && try-ln $PDIR/$TEST.out $TDIR/$TEST.ok OCHECK=$(expand-var OUTPUT_CHECK) echo "Output check command: $OCHECK" if ! eval $OCHECK 2>$TMPDIR/exec.out ; then