diff options
Diffstat (limited to 'python/samba/tests/docs.py')
-rw-r--r-- | python/samba/tests/docs.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py index 4b67bc2bd38..3657d3d85cb 100644 --- a/python/samba/tests/docs.py +++ b/python/samba/tests/docs.py @@ -26,6 +26,21 @@ import os import subprocess import xml.etree.ElementTree as ET +config_h = os.path.join("bin/default/include/config.h") +config_hash = dict() + +if os.path.exists(config_h): + config_hash = dict() + f = open(config_h, 'r') + try: + lines = f.readlines() + config_hash = dict((x[0], ' '.join(x[1:])) + for x in map(lambda line: line.strip().split(' ')[1:], + list(filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines)))) + finally: + f.close() + +have_gnutls_system_config_support = ("HAVE_GNUTLS_SET_DEFAULT_PRIORITY_APPEND" in config_hash) class TestCase(samba.tests.TestCaseInTempDir): @@ -128,6 +143,11 @@ class SmbDotConfTests(TestCase): 'smbd max async dosmode', ]) + # 'tls priority' has a legacy default value if we don't link against a + # modern GnuTLS version. + if not have_gnutls_system_config_support: + special_cases.add('tls priority') + def setUp(self): super(SmbDotConfTests, self).setUp() # create a minimal smb.conf file for testparm |