From bbf62213efb0b77388aff1f5feb852414e1128a2 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 5 May 2013 15:37:58 -0700 Subject: 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 Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Mon May 6 12:53:37 CEST 2013 on sn-devel-104 --- selftest/tests.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'selftest') diff --git a/selftest/tests.py b/selftest/tests.py index 9a59e9d0db..aebfc57630 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") -- cgit