fate: translate exit status to signal name

Originally committed as revision 24623 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2010-07-31 16:53:09 +00:00
parent 43b3273e5b
commit 4e705a6806
1 changed files with 6 additions and 1 deletions

View File

@ -106,6 +106,11 @@ mkdir -p "$outdir"
$command > "$outfile" 2>$errfile $command > "$outfile" 2>$errfile
err=$? err=$?
if [ $err -gt 128 ]; then
sig=$(kill -l $err 2>/dev/null)
test "${sig}" = "${sig%[^A-Z]*}" || unset sig
fi
if test -e "$ref"; then if test -e "$ref"; then
case $cmp in case $cmp in
diff) diff -u -w "$ref" "$outfile" >$cmpfile ;; diff) diff -u -w "$ref" "$outfile" >$cmpfile ;;
@ -120,7 +125,7 @@ else
err=1 err=1
fi fi
echo "${test}:${err}:$($base64 <$cmpfile):$($base64 <$errfile)" >$repfile echo "${test}:${sig:-$err}:$($base64 <$cmpfile):$($base64 <$errfile)" >$repfile
test $err = 0 && rm -f $outfile $errfile $cmpfile $cleanfiles test $err = 0 && rm -f $outfile $errfile $cmpfile $cleanfiles
exit $err exit $err