X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=eval%2Flibeval.sh;h=2bb84bb61cde45b77e66eb6a6d02c540bed3f376;hb=7946316d0ce9f19d3e8093b3904fa9aeba985b10;hp=1e59e512ea6cf8b36268f9e0fcc861eb832e6152;hpb=0dda12c127848b8d54c4b21223f63eaf05fa9ac4;p=moe.git diff --git a/eval/libeval.sh b/eval/libeval.sh index 1e59e51..2bb84bb 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 @@ -305,6 +305,15 @@ function test-prolog ;; none) echo "Input file: " ;; + dir) echo "Input file: files in directory $PDIR/$TEST.in/" + [ -d $PDIR/$TEST.in ] || die "Not a directory: $PDIR/$TEST.in" + # TODO: recursive ln to $TDIR + cp -r $PDIR/$TEST.in $TDIR/$TEST.in + cp -r $PDIR/$TEST.in/* $BOXDIR/ + # Can have .stdin, but empty by default + touch $BOXDIR/.stdin + BOX_EXTRAS="$BOX_EXTRAS -i.stdin" + ;; *) die "Unknown IN_TYPE $IN_TYPE" ;; esac