Set make variable KEEP to non-zero value to preserve temp files when a test has passed. Helpful in diagnosing failed tests when test outfile is some type of single hash and does not reveal differences in processed output.tags/n4.1
| @@ -222,6 +222,11 @@ Set to @samp{1} to generate the missing or mismatched references. | |||||
| Specify which hardware acceleration to use while running regression tests, | Specify which hardware acceleration to use while running regression tests, | ||||
| by default @samp{none} is used. | by default @samp{none} is used. | ||||
| @item KEEP | |||||
| Set to @samp{1} to keep temp files generated by fate test(s) when test is successful. | |||||
| Default is @samp{0}, which removes these files. Files are always kept when a test | |||||
| fails. | |||||
| @end table | @end table | ||||
| @section Examples | @section Examples | ||||
| @@ -225,7 +225,7 @@ FATE += $(FATE_HW-yes) | |||||
| $(FATE) $(FATE_TESTS-no): export PROGSUF = $(PROGSSUF) | $(FATE) $(FATE_TESTS-no): export PROGSUF = $(PROGSSUF) | ||||
| $(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 $@ "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' | |||||
| $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' '$(KEEP)' | |||||
| fate-list: | fate-list: | ||||
| @printf '%s\n' $(sort $(FATE)) | @printf '%s\n' $(sort $(FATE)) | ||||
| @@ -25,6 +25,7 @@ cmp_unit=${15:-2} | |||||
| gen=${16:-no} | gen=${16:-no} | ||||
| hwaccel=${17:-none} | hwaccel=${17:-none} | ||||
| report_type=${18:-standard} | report_type=${18:-standard} | ||||
| keep=${19:-0} | |||||
| outdir="tests/data/fate" | outdir="tests/data/fate" | ||||
| outfile="${outdir}/${test}" | outfile="${outdir}/${test}" | ||||
| @@ -428,7 +429,9 @@ if test $err != 0 && test $gen != "no" ; then | |||||
| fi | fi | ||||
| if test $err = 0; then | if test $err = 0; then | ||||
| rm -f $outfile $errfile $cmpfile $cleanfiles | |||||
| if test $keep = 0; then | |||||
| rm -f $outfile $errfile $cmpfile $cleanfiles | |||||
| fi | |||||
| elif test $gen = "no"; then | elif test $gen = "no"; then | ||||
| echo "Test $test failed. Look at $errfile for details." | echo "Test $test failed. Look at $errfile for details." | ||||
| test "${V:-0}" -gt 0 && cat $errfile | test "${V:-0}" -gt 0 && cat $errfile | ||||