summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-30 11:21:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-30 11:21:15 +0100
commit6c8aa2035d5cf161d6da7d222ef0b47fe377740e (patch)
treecd1c725eecaf805e5cd2014d35f5079377c07319 /tests
parent65340c976c664b94427ac50f5d03b0e77883c108 (diff)
parentb01b60a29db1ec4478b82d47d2ed668173f5de63 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: fate: add an option to generate the references Conflicts: doc/fate.texi tests/fate-run.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile2
-rwxr-xr-xtests/fate-run.sh7
2 files changed, 8 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 0f911e1b66..802f350d2c 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -155,7 +155,7 @@ fate:: $(FATE)
$(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)"
- $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)'
+ $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)'
fate-list:
@printf '%s\n' $(sort $(FATE))
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 0520d62f7d..14896e5efc 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}"
@@ -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