* 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>tags/n2.0
| @@ -185,6 +185,8 @@ the synchronisation of the samples directory. | |||||
| The @var{TARGET_EXEC} option provides a way to run FATE wrapped in | The @var{TARGET_EXEC} option provides a way to run FATE wrapped in | ||||
| @command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets | @command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets | ||||
| through @command{ssh}. | through @command{ssh}. | ||||
| @item GEN | |||||
| Set to @var{1} to generate the missing or mismatched references. | |||||
| @end table | @end table | ||||
| @section Examples | @section Examples | ||||
| @@ -155,7 +155,7 @@ fate:: $(FATE) | |||||
| $(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | $(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | ||||
| @echo "TEST $(@:fate-%=%)" | @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: | fate-list: | ||||
| @printf '%s\n' $(sort $(FATE)) | @printf '%s\n' $(sort $(FATE)) | ||||
| @@ -22,6 +22,7 @@ cmp_shift=${12:-0} | |||||
| cmp_target=${13:-0} | cmp_target=${13:-0} | ||||
| size_tolerance=${14:-0} | size_tolerance=${14:-0} | ||||
| cmp_unit=${15:-2} | cmp_unit=${15:-2} | ||||
| gen=${16:-no} | |||||
| outdir="tests/data/fate" | outdir="tests/data/fate" | ||||
| outfile="${outdir}/${test}" | outfile="${outdir}/${test}" | ||||
| @@ -197,6 +198,12 @@ fi | |||||
| echo "${test}:${sig:-$err}:$($base64 <$cmpfile):$($base64 <$errfile)" >$repfile | 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 | if test $err = 0; then | ||||
| rm -f $outfile $errfile $cmpfile $cleanfiles | rm -f $outfile $errfile $cmpfile $cleanfiles | ||||
| else | else | ||||