Commit 35d1f726 authored by Janne Grunau's avatar Janne Grunau Committed by Diego Biurrun

fate: Add --ignore-tests configure option for omitting specific FATE tests

This can be useful to filter out noise in known-broken scenarios like
miscompilation by legacy compilers and similar.

Originally based on a patch by Diego Biurrun.
Signed-off-by: 's avatarDiego Biurrun <diego@biurrun.de>
parent 8a34f365
...@@ -348,6 +348,8 @@ Developer options (useful when working on Libav itself): ...@@ -348,6 +348,8 @@ Developer options (useful when working on Libav itself):
--random-seed=VALUE seed value for --enable/disable-random --random-seed=VALUE seed value for --enable/disable-random
--disable-valgrind-backtrace do not print a backtrace under Valgrind --disable-valgrind-backtrace do not print a backtrace under Valgrind
(only applies to --disable-optimizations builds) (only applies to --disable-optimizations builds)
--ignore-tests=TESTS comma-separated list (without "fate-" prefix
in the name) of tests whose result is ignored
NOTE: Object files are built at the place where configure is launched. NOTE: Object files are built at the place where configure is launched.
EOF EOF
...@@ -1815,6 +1817,7 @@ CMDLINE_SET=" ...@@ -1815,6 +1817,7 @@ CMDLINE_SET="
host_ld host_ld
host_ldflags host_ldflags
host_os host_os
ignore_tests
ld ld
logfile logfile
malloc_prefix malloc_prefix
...@@ -5192,6 +5195,13 @@ for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf ind ...@@ -5192,6 +5195,13 @@ for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf ind
echo echo
done done
if test -n "$ignore_tests"; then
ignore_tests=$(echo $ignore_tests | tr ',' ' ')
echo "Ignored FATE tests:"
echo $ignore_tests | print_3_columns
echo
fi
license="LGPL version 2.1 or later" license="LGPL version 2.1 or later"
if enabled nonfree; then if enabled nonfree; then
license="nonfree and unredistributable" license="nonfree and unredistributable"
...@@ -5316,6 +5326,7 @@ SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB} ...@@ -5316,6 +5326,7 @@ SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB} SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD} VERSION_SCRIPT_POSTPROCESS_CMD=${VERSION_SCRIPT_POSTPROCESS_CMD}
SAMPLES:=${samples:-\$(LIBAV_SAMPLES)} SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
IGNORE_TESTS=$ignore_tests
EOF EOF
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> avbuild/config.mak' $LIBRARY_LIST map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> avbuild/config.mak' $LIBRARY_LIST
......
...@@ -139,6 +139,7 @@ workdir= # directory in which to do all the work ...@@ -139,6 +139,7 @@ workdir= # directory in which to do all the work
fate_recv="ssh -T fate@@fate.libav.org" # command to submit report fate_recv="ssh -T fate@@fate.libav.org" # command to submit report
comment= # optional description comment= # optional description
build_only= # set to "yes" for a compile-only instance that skips tests build_only= # set to "yes" for a compile-only instance that skips tests
ignore_tests=
# the following are optional and map to configure options # the following are optional and map to configure options
arch= arch=
......
...@@ -143,11 +143,13 @@ endif ...@@ -143,11 +143,13 @@ endif
FATE_UTILS = base64 tiny_psnr FATE_UTILS = base64 tiny_psnr
$(addprefix fate-, $(IGNORE_TESTS)): REPORT=ignore
fate: $(FATE) fate: $(FATE)
$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF)) $(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
@echo "TEST $(@:fate-%=%)" @echo "TEST $(@:fate-%=%)"
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)'
fate-list: fate-list:
@printf '%s\n' $(sort $(FATE)) @printf '%s\n' $(sort $(FATE))
......
...@@ -24,6 +24,7 @@ size_tolerance=${14:-0} ...@@ -24,6 +24,7 @@ size_tolerance=${14:-0}
cmp_unit=${15:-2} cmp_unit=${15:-2}
gen=${16:-no} gen=${16:-no}
hwaccel=${17:-none} hwaccel=${17:-none}
report_type=${18:-standard}
outdir="tests/data/fate" outdir="tests/data/fate"
outfile="${outdir}/${test}" outfile="${outdir}/${test}"
...@@ -212,13 +213,17 @@ if test -e "$ref" || test $cmp = "oneline" ; then ...@@ -212,13 +213,17 @@ if test -e "$ref" || test $cmp = "oneline" ; then
esac esac
cmperr=$? cmperr=$?
test $err = 0 && err=$cmperr test $err = 0 && err=$cmperr
test $err = 0 || cat $cmpfile if [ "$report_type" = "ignore" ]; then
test $err = 0 || echo "IGNORE fate-${test}" && err=0
else
test $err = 0 || cat $cmpfile
fi
else else
echo "reference file '$ref' not found" echo "reference file '$ref' not found"
err=1 err=1
fi fi
if [ $err -eq 0 ]; then if [ $err -eq 0 ] && test $report_type = "standard" ; then
unset cmpo erro unset cmpo erro
else else
cmpo="$($base64 <$cmpfile)" cmpo="$($base64 <$cmpfile)"
......
...@@ -47,6 +47,7 @@ configure()( ...@@ -47,6 +47,7 @@ configure()(
--prefix="${inst}" \ --prefix="${inst}" \
--samples="${samples}" \ --samples="${samples}" \
--enable-gpl \ --enable-gpl \
${ignore_tests:+--ignore-tests="$ignore_tests"} \
${arch:+--arch=$arch} \ ${arch:+--arch=$arch} \
${cpu:+--cpu="$cpu"} \ ${cpu:+--cpu="$cpu"} \
${toolchain:+--toolchain="$toolchain"} \ ${toolchain:+--toolchain="$toolchain"} \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment