diff options
author | Andreas Schneider <asn@samba.org> | 2016-12-15 10:33:59 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-12-16 05:43:10 +0100 |
commit | 7585aa6c8f225a7aed51520a2af15f0037cd37f6 (patch) | |
tree | 7503ab719c6a32dde4ed1c04726db28a00496deb /selftest | |
parent | 494482c65493b3ec2532af52a3ad0a4adfef4416 (diff) | |
download | samba-7585aa6c8f225a7aed51520a2af15f0037cd37f6.tar.gz |
testsuite: Add cmocka unit test for smb_krb5_kt_open()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 16 05:43:12 CET 2016 on sn-devel-144
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/tests.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/selftest/tests.py b/selftest/tests.py index 04a8df2d950..eabe71401fc 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -26,13 +26,20 @@ except KeyError: samba4bindir = bindir() config_h = os.path.join(samba4bindir, "default/include/config.h") -# define here var to check what we support +# check available features +config_hash = dict() f = open(config_h, 'r') try: - have_man_pages_support = ("XSLTPROC_MANPAGES 1" in f.read()) + lines = f.readlines() + config_hash = dict((x[0], ' '.join(x[1:])) + for x in map(lambda line: line.strip().split(' ')[1:], + filter(lambda line: (line[0:7] == '#define') and (len(line.split(' ')) > 2), lines))) finally: f.close() +have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash) +with_cmocka = ("HAVE_CMOCKA" in config_hash) + planpythontestsuite("none", "samba.tests.source") if have_man_pages_support: planpythontestsuite("none", "samba.tests.docs") @@ -123,3 +130,7 @@ planpythontestsuite("none", "samba.tests.kcc.graph_utils") planpythontestsuite("none", "samba.tests.kcc.kcc_utils") planpythontestsuite("none", "samba.tests.kcc.ldif_import_export") plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")]) + +if with_cmocka: + plantestsuite("samba.unittests.krb5samba", "none", + [os.path.join(bindir(), "default/testsuite/unittests/test_krb5samba")]) |