FATE: add CPUFLAGS variable, mapping to -cpuflags avconv option.
authorAnton Khirnov <anton@khirnov.net>
Mon, 5 Mar 2012 07:05:56 +0000 (08:05 +0100)
committerAnton Khirnov <anton@khirnov.net>
Tue, 6 Mar 2012 14:03:36 +0000 (15:03 +0100)
doc/fate.texi
tests/Makefile
tests/fate-run.sh
tests/regression-funcs.sh

index b4f520fef9cf3694a389668cf081ab127ce08001..c1011e73f88fbfbe5dafeb4c845a00d5f2eb4370 100644 (file)
@@ -75,10 +75,12 @@ meaning only while running the regression tests.
 @item THREADS
 Specify how many threads to use while running regression tests, it is
 quite useful to detect thread-related regressions.
+@item CPUFLAGS
+Specify a mask to be applied to autodetected CPU flags.
 @end table
 
 @example
-    make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
+    make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
 @end example
 
 @chapter Automated Tests
index 6fed995e0a3e8db23dd15318519a74fbe6b2d451..5c65237b440427ed269d0b6b64e93a2733ddeaa3 100644 (file)
@@ -116,7 +116,7 @@ fate: $(FATE)
 
 $(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
        @echo "TEST    $(@:fate-%=%)"
-       $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
+       $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)'
 
 fate-list:
        @printf '%s\n' $(sort $(FATE))
index 07cfe74ba75a22a80590317c1cd5aefafc34bba2..a1503aecbd40fc90fc2fb4dcc7ef34da2684a156 100755 (executable)
@@ -17,6 +17,7 @@ ref=${7:-"${base}/ref/fate/${test}"}
 fuzz=$8
 threads=${9:-1}
 thread_type=${10:-frame+slice}
+cpuflags=${11:-all}
 
 outdir="tests/data/fate"
 outfile="${outdir}/${test}"
@@ -50,7 +51,7 @@ run(){
 }
 
 avconv(){
-    run avconv -nostats -threads $threads -thread_type $thread_type "$@"
+    run avconv -nostats -threads $threads -thread_type $thread_type -cpuflags $cpuflags "$@"
 }
 
 framecrc(){
@@ -76,7 +77,7 @@ pcm(){
 regtest(){
     t="${test#$2-}"
     ref=${base}/ref/$2/$t
-    ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type"
+    ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" "$cpuflags"
 }
 
 codectest(){
index 3306f399416d6824153f235c4f13bcd85ebdba2a..3889129009ea23b8355912ef1243a4c400fabe32 100755 (executable)
@@ -10,6 +10,7 @@ raw_src_dir=$3
 target_exec=$4
 target_path=$5
 threads=${6:-1}
+cpuflags=${8:-all}
 
 datadir="./tests/data"
 target_datadir="${target_path}/${datadir}"
@@ -43,7 +44,7 @@ echov(){
 
 . $(dirname $0)/md5.sh
 
-AVCONV_OPTS="-nostats -y"
+AVCONV_OPTS="-nostats -y -cpuflags $cpuflags"
 COMMON_OPTS="-flags +bitexact -idct simple -sws_flags +accurate_rnd+bitexact"
 DEC_OPTS="$COMMON_OPTS -threads $threads"
 ENC_OPTS="$COMMON_OPTS -threads 1 -dct fastint"