>From a4781b15d480c5eb962160c9d5db57c279f28c8e Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 5 May 2013 15:37:58 -0700 Subject: [PATCH 4/4] selftest: do not run doc tests if we don't build manpages if XSLTPROC_MANPAGES is not set then manpages won't be built so there is no sense trying to test it. Signed-off-by: Matthieu Patou --- selftest/tests.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/selftest/tests.py b/selftest/tests.py index 9a59e9d..aebfc57 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -20,8 +20,22 @@ from selftesthelpers import * +try: + config_h = os.environ["CONFIG_H"] +except KeyError: + config_h = os.path.join(samba4bindir, "default/include/config.h") + +# define here var to check what we support +f = open(config_h, 'r') +try: + have_man_pages_support = ("XSLTPROC_MANPAGES 1" in f.read()) +finally: + f.close() + planpythontestsuite("none", "samba.tests.source") -planpythontestsuite("none", "samba.tests.docs") +if have_man_pages_support: + planpythontestsuite("none", "samba.tests.docs") + planpythontestsuite("none", "selftest.tests.test_suite", extra_path=[srcdir()]) planpythontestsuite("none", "subunit") planpythontestsuite("none", "samba.tests.blackbox.ndrdump") -- 1.7.9.5