Merge remote-tracking branch 'qatar/master'
[ffmpeg.git] / tests / fate-run.sh
index 0520d62..14896e5 100755 (executable)
@@ -22,6 +22,7 @@ cmp_shift=${12:-0}
 cmp_target=${13:-0}
 size_tolerance=${14:-0}
 cmp_unit=${15:-2}
+gen=${16:-no}
 
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
@@ -197,6 +198,12 @@ fi
 
 echo "${test}:${sig:-$err}:$($base64 <$cmpfile):$($base64 <$errfile)" >$repfile
 
+if test $err != 0 && test $gen != "no" ; then
+    echo "GEN     $ref"
+    cp -f "$outfile" "$ref"
+    err=$?
+fi
+
 if test $err = 0; then
     rm -f $outfile $errfile $cmpfile $cleanfiles
 else