[FFmpeg-cvslog] r24133 - in trunk: Makefile tests/fate-run.sh

mru subversion
Fri Jul 9 02:40:46 CEST 2010


Author: mru
Date: Fri Jul  9 02:40:45 2010
New Revision: 24133

Log:
fate: pass additional variables to test script

This passes the following additional variables to the test script:

- CMP  method to use comparing output with reference, default 'diff'
- REF  reference file, default 'tests/ref/fate/${test}'
- FUZZ maximum fuzz factor in comparison, meaning depends on CMP

Modified:
   trunk/Makefile
   trunk/tests/fate-run.sh

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile	Fri Jul  9 02:40:37 2010	(r24132)
+++ trunk/Makefile	Fri Jul  9 02:40:45 2010	(r24133)
@@ -281,7 +281,7 @@ ifdef SAMPLES
 fate: $(FATE_TESTS)
 $(FATE_TESTS): ffmpeg$(EXESUF)
 	@echo "TEST FATE   $(@:fate-%=%)"
-	@$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)'
+	@$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)'
 else
 fate $(FATE_TESTS):
 	@echo "SAMPLES not specified, cannot run FATE"

Modified: trunk/tests/fate-run.sh
==============================================================================
--- trunk/tests/fate-run.sh	Fri Jul  9 02:40:37 2010	(r24132)
+++ trunk/tests/fate-run.sh	Fri Jul  9 02:40:45 2010	(r24133)
@@ -8,12 +8,17 @@ SAMPLES_PATH=$2
 target_exec=$3
 BUILD_PATH=$4
 command=$5
+cmp=${6:-diff}
 
-ref="${base}/ref/fate/${test}"
+ref=${7:-"${base}/ref/fate/${test}"}
+fuzz=$8
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
 
 mkdir -p "$outdir"
 
 eval $target_exec $command > "$outfile" 2>/dev/null
-diff -u -w "$ref" "$outfile"
+
+case $cmp in
+    diff)   diff -u -w "$ref" "$outfile"            ;;
+esac



More information about the ffmpeg-cvslog mailing list