running only selected tests in samba sources

Jeremy Allison jra at samba.org
Mon Aug 1 17:21:24 UTC 2022


On Mon, Aug 01, 2022 at 05:35:15PM +0300, Michael Tokarev via samba-technical wrote:
>Hi!
>
>Is there a way, after successful build of samba source, to run just selected tests
>without running whole testsuite, *and* without (re)building everything with the
>--enable-selftest option?
>
>Many tests do not require this option to be enabled. For a very simple example,
>consider lib/ldb/ tests - when ldb is built from its own separate source
>tarball, it's easy to run its tests. But when it is built as part of whole samba
>source, an attempt to run ldb tests - even by providing the right test selection -
>still fails due to main samba wscript checking if --enable-selftest has been enabled.
>
>In Debian we used to build libldb from its own source, and running a testsuite there
>has been useful. But now we build it from main samba source tree and we can't run
>the testsuite anymore.
>
>Many more other tests can be useful without --enable-selftest too.
>
>I'm about to patch wscript to omit checks for --enable-selftest options in wscripts..

make test TESTS=(wildcard test name)

for example, to test only the SMB raw.streams tests:

make test TESTS=raw.stream



More information about the samba-technical mailing list