[SCM] libav/experimental: fate: pass additional variables to test script
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:10:47 UTC 2013
The following commit has been merged in the experimental branch:
commit 3ade7d32c1f17f2f833ff17c2cbd46d6de66104c
Author: Måns Rullgård <mans at mansr.com>
Date: Fri Jul 9 00:40:45 2010 +0000
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
Originally committed as revision 24133 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/Makefile b/Makefile
index fe39154..efb714f 100644
--- a/Makefile
+++ b/Makefile
@@ -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"
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 899580f..39f42ff 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -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
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list