mirror of https://git.ffmpeg.org/ffmpeg.git
fate: add an option to generate the references
Useful to add or update fate tests.
This commit is contained in:
parent
e46a2a7309
commit
b01b60a29d
|
@ -85,6 +85,8 @@ by default @var{slice+frame}
|
||||||
Specify a mask to be applied to autodetected CPU flags.
|
Specify a mask to be applied to autodetected CPU flags.
|
||||||
@item TARGET_EXEC
|
@item TARGET_EXEC
|
||||||
Specify or override the wrapper used to run the tests.
|
Specify or override the wrapper used to run the tests.
|
||||||
|
@item GEN
|
||||||
|
Set to @var{1} to generate the missing or mismatched references.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@example
|
@example
|
||||||
|
|
|
@ -118,7 +118,7 @@ fate: $(FATE)
|
||||||
|
|
||||||
$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
$(FATE): $(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}"
|
||||||
|
@ -189,5 +190,11 @@ 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
|
||||||
|
|
||||||
test $err = 0 && rm -f $outfile $errfile $cmpfile $cleanfiles
|
test $err = 0 && rm -f $outfile $errfile $cmpfile $cleanfiles
|
||||||
exit $err
|
exit $err
|
||||||
|
|
Loading…
Reference in New Issue