[FFmpeg-devel] [PATCH] fate.sh: Allow overriding what targets to make for running the tests

Martin Storsjö martin at martin.st
Mon Nov 27 14:31:18 EET 2023


This can be useful if doing testing of uncommon CPU extensions by
running tests with QEMU (by configuring with e.g.
"target_exec=qemu-aarch64"), by only running the checkasm tests,
to get a reasonable test coverage without excessive test runtime.

For such a config, setting fate_targets="fate-checkasm fate-cpu"
can be a good tradeoff.
---
 doc/fate_config.sh.template | 2 ++
 tests/fate.sh               | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/fate_config.sh.template b/doc/fate_config.sh.template
index ab1bda45e4..06bb79a832 100644
--- a/doc/fate_config.sh.template
+++ b/doc/fate_config.sh.template
@@ -31,3 +31,5 @@ makeopts=       # extra options passed to 'make'
                 # defaulting to makeopts above if this is not set
 #tar=           # command to create a tar archive from its arguments on stdout,
                 # defaults to 'tar c'
+#fate_targets=  # targets to make when running fate; defaults to "fate",
+                # can be set to run a subset of tests, e.g. "fate-checkasm".
diff --git a/tests/fate.sh b/tests/fate.sh
index 072e471256..d07a1cf90c 100755
--- a/tests/fate.sh
+++ b/tests/fate.sh
@@ -101,7 +101,7 @@ compile_extra()(
 fate()(
     test "$build_only" = "yes" && return
     cd ${build} || return
-    ${make} ${makeopts_fate-${makeopts}} -k fate
+    ${make} ${makeopts_fate-${makeopts}} -k ${fate_targets}
 )
 
 clean(){
@@ -132,6 +132,7 @@ cd ${workdir}       || die "cd ${workdir} failed"
 src=${workdir}/src
 : ${build:=${workdir}/build}
 : ${inst:=${workdir}/install}
+: ${fate_targets:=fate}
 
 test -d "$src" && update || checkout || die "Error fetching source"
 
-- 
2.34.1



More information about the ffmpeg-devel mailing list