This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 563303b68ff0ba54ab6b75c3c7f34005d706cab5
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Wed Jun 17 22:03:59 2026 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Sun Sep 13 02:58:50 2026 +0000

    fate: allow tests to clean up generated files
    
    Add CLEANFILES, a per-test list of extra files to remove after a run.
    Honoured unless KEEP_FILES is set.
    
    Signed-off-by: Kacper Michajłow <[email protected]>
---
 tests/Makefile    | 2 +-
 tests/fate-run.sh | 8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index 3f0132dd97..43c34ee253 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -324,7 +324,7 @@ $(FATE): export EXECSUF = $(EXESUF)
 $(FATE): export HOSTEXECSUF = $(HOSTEXESUF)
 $(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) | $(FATE_OUTDIRS)
        @echo "TEST    $(@:fate-%=%)$(FATE_SUFFIX)"
-       $(Q)$(SRC_PATH)/tests/fate-run.sh $@$(FATE_SUFFIX) "$(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_FILES)'
+       $(Q)$(SRC_PATH)/tests/fate-run.sh $@$(FATE_SUFFIX) "$(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_FILES)' '$(CLEANFILES)'
 
 fate-list:
        @printf '%s\n' $(sort $(FATE))
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index d0726c64dd..39be7c7fb8 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -26,6 +26,7 @@ gen=${16:-no}
 hwaccel=${17:-none}
 report_type=${18:-standard}
 keep=${19:-0}
+test "$keep" -ge 1 || cleanfiles=${20}
 
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
@@ -253,7 +254,7 @@ enc_dec_pcm(){
     src_file=$(target_path $4)
     shift 4
     encfile="${outdir}/${test}.${out_fmt}"
-    cleanfiles=$encfile
+    cleanfiles="$cleanfiles $encfile"
     encfile=$(target_path ${encfile})
     ffmpeg -auto_conversion_filters -i $src_file "$@" -f $out_fmt -y 
${encfile} || return
     ffmpeg -auto_conversion_filters -bitexact -i ${encfile} -c:a 
pcm_${pcm_fmt} -fflags +bitexact -f ${dec_fmt} -
@@ -719,7 +720,7 @@ concat(){
 
     concatfile="${outdir}/${test}.ffconcat"
     packetfile="${outdir}/${test}.ffprobe"
-    cleanfiles="$concatfile $packetfile"
+    cleanfiles="$cleanfiles $concatfile $packetfile"
 
     awk "{gsub(/%SRCFILE%/, \"$sample\"); print}" $template > $concatfile
 
@@ -806,7 +807,8 @@ fi
 
 if test $err = 0; then
     if test $keep -lt 2; then
-        rm -f $outfile $errfile $cmpfile $cleanfiles
+        set +f
+        rm -f "$outfile" "$errfile" "$cmpfile" $cleanfiles
     fi
 elif test $gen = "no"; then
     echo "Test $test failed. Look at $errfile for details."

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to