summaryrefslogtreecommitdiff
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-03-18 23:45:58 +0100
committerLuca Barbato <lu_zero@gentoo.org>2013-03-29 15:41:26 +0100
commitb01b60a29db1ec4478b82d47d2ed668173f5de63 (patch)
treed5e6ff97c08feb3760ca8c35875d001d4556daac /tests/fate-run.sh
parente46a2a7309d8e8b8c1573047731dea77695d0ce1 (diff)
fate: add an option to generate the references
Useful to add or update fate tests.
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index d1633e8be4..70821bbcec 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -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}"
@@ -189,5 +190,11 @@ 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
+
test $err = 0 && rm -f $outfile $errfile $cmpfile $cleanfiles
exit $err