From: Christof Schmitt Date: Wed, 19 Aug 2020 18:54:43 +0000 (-0700) Subject: selftest: Add function for checking whether a module is enabled X-Git-Tag: talloc-2.3.2~569 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=80add26b5f6866210d6a2c63d1086e92d83ca3df;p=thirdparty%2Fsamba.git selftest: Add function for checking whether a module is enabled Signed-off-by: Christof Schmitt Reviewed-by: Jeremy Allison --- diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 556b50c38f5..b2217fbea2b 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -70,6 +70,12 @@ have_inotify = ("HAVE_INOTIFY" in config_hash) have_ldwrap = ("HAVE_LDWRAP" in config_hash) with_pthreadpool = ("WITH_PTHREADPOOL" in config_hash) +def is_module_enabled(module): + if module in config_hash["STRING_SHARED_MODULES"]: + return True + if module in config_hash["STRING_STATIC_MODULES"]: + return True + return False plantestsuite("samba3.blackbox.success", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_success.sh")]) plantestsuite("samba3.blackbox.failure", "nt4_dc:local", [os.path.join(samba3srcdir, "script/tests/test_failure.sh")])