fate: fail with a sensible error message if reference file is missing
[libav.git] / tests / fate-run.sh
index 278e247..ba5d09d 100755 (executable)
@@ -24,6 +24,11 @@ oneoff(){
     fi
 }
 
+if ! test -e "$ref"; then
+    echo "reference file '$ref' not found"
+    exit 1
+fi
+
 mkdir -p "$outdir"
 
 eval $target_exec $command > "$outfile" 2>/dev/null || exit
@@ -32,3 +37,5 @@ case $cmp in
     diff)   diff -u -w "$ref" "$outfile"            ;;
     oneoff) oneoff     "$ref" "$outfile" "$fuzz"    ;;
 esac
+
+test $? = 0 && rm $outfile