[FFmpeg-cvslog] fate: add support for multithread testing
Luca Barbato
git at videolan.org
Thu Mar 24 03:43:41 CET 2011
ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue Mar 22 00:07:54 2011 +0100| [7851eb68c60e61497ec715f28f071c1527de1d38] | committer: Luca Barbato
fate: add support for multithread testing
Add a THREADS variable to fate calls.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7851eb68c60e61497ec715f28f071c1527de1d38
---
Makefile | 2 +-
tests/fate-run.sh | 5 +++--
tests/regression-funcs.sh | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index e3b7f1e..2d97c8b 100644
--- a/Makefile
+++ b/Makefile
@@ -290,7 +290,7 @@ fate: $(FATE)
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)"
- $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)'
+ $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)'
fate-list:
@printf '%s\n' $(sort $(FATE))
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index c4a9a13..3a6b46b 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -15,6 +15,7 @@ command=$5
cmp=${6:-diff}
ref=${7:-"${base}/ref/fate/${test}"}
fuzz=$8
+threads=${9:-1}
outdir="tests/data/fate"
outfile="${outdir}/${test}"
@@ -48,7 +49,7 @@ run(){
}
ffmpeg(){
- run ffmpeg -v 0 "$@"
+ run ffmpeg -v 0 -threads $threads "$@"
}
framecrc(){
@@ -77,7 +78,7 @@ regtest(){
cleanfiles="$cleanfiles $outfile $errfile"
outfile=tests/data/regression/$2/$t
errfile=tests/data/$t.$2.err
- ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path"
+ ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads"
}
codectest(){
diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh
index 3ca3c9c..148a255 100755
--- a/tests/regression-funcs.sh
+++ b/tests/regression-funcs.sh
@@ -9,6 +9,7 @@ test_ref=$2
raw_src_dir=$3
target_exec=$4
target_path=$5
+threads=${6:-1}
datadir="./tests/data"
target_datadir="${target_path}/${datadir}"
@@ -52,7 +53,7 @@ echov(){
. $(dirname $0)/md5.sh
-FFMPEG_OPTS="-v 0 -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact"
+FFMPEG_OPTS="-v 0 -threads $threads -y -flags +bitexact -dct fastint -idct simple -sws_flags +accurate_rnd+bitexact"
run_ffmpeg()
{
More information about the ffmpeg-cvslog
mailing list