Add samba.ensure_third_party_module() function, loading external python modules from...
[Samba.git] / selftest / tests.py
blobe83b23628196827a9e6fe20a128341f231ef35dd
1 #!/usr/bin/python
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba test suite.
5 # The output of this script is parsed by selftest.pl, which then decides
6 # which of the tests to actually run. It will, for example, skip all tests
7 # listed in selftest/skip or only run a subset during "make quicktest".
9 # The idea is that this script outputs all of the tests of Samba, not
10 # just those that are known to pass, and list those that should be skipped
11 # or are known to fail in selftest/skip or selftest/knownfail. This makes it
12 # very easy to see what functionality is still missing in Samba and makes
13 # it possible to run the testsuite against other servers, such as
14 # Windows that have a different set of features.
16 # The syntax for a testsuite is "-- TEST --" on a single line, followed
17 # by the name of the test, the environment it needs and the command to run, all
18 # three separated by newlines. All other lines in the output are considered
19 # comments.
21 from selftesthelpers import *
23 try:
24 config_h = os.environ["CONFIG_H"]
25 except KeyError:
26 config_h = os.path.join(samba4bindir, "default/include/config.h")
28 # define here var to check what we support
29 f = open(config_h, 'r')
30 try:
31 have_man_pages_support = ("XSLTPROC_MANPAGES 1" in f.read())
32 finally:
33 f.close()
35 planpythontestsuite("none", "samba.tests.source")
36 if have_man_pages_support:
37 planpythontestsuite("none", "samba.tests.docs")
39 planpythontestsuite("none", "selftest.tests.test_suite", extra_path=[srcdir()])
40 planpythontestsuite("none", "subunit")
41 planpythontestsuite("none", "samba.tests.blackbox.ndrdump")
42 planpythontestsuite("none", "api", name="ldb.python", extra_path=['lib/ldb/tests/python'])
43 planpythontestsuite("none", "samba.tests.credentials")
44 planpythontestsuite("none", "samba.tests.registry")
45 planpythontestsuite("none", "samba.tests.auth")
46 planpythontestsuite("none", "samba.tests.getopt")
47 planpythontestsuite("none", "samba.tests.security")
48 planpythontestsuite("none", "samba.tests.dcerpc.misc")
49 planpythontestsuite("none", "samba.tests.param")
50 planpythontestsuite("none", "samba.tests.upgrade")
51 planpythontestsuite("none", "samba.tests.core")
52 planpythontestsuite("none", "samba.tests.provision")
53 planpythontestsuite("none", "samba.tests.samba3")
54 planpythontestsuite("none", "samba.tests.strings")
55 planpythontestsuite("none", "samba.tests.netcmd")
56 planpythontestsuite("none", "samba.tests.dcerpc.rpc_talloc")
57 planpythontestsuite("none", "samba.tests.samdb")
58 planpythontestsuite("none", "samba.tests.hostconfig")
59 planpythontestsuite("dc:local", "samba.tests.messaging")
60 planpythontestsuite("none", "samba.tests.samba3sam")
61 planpythontestsuite(
62 "none", "wafsamba.tests.test_suite",
63 extra_path=[os.path.join(samba4srcdir, "..", "buildtools"),
64 os.path.join(samba4srcdir, "..", "buildtools", "wafadmin")])
65 plantestsuite(
66 "samba4.blackbox.dbcheck.alpha13", "none",
67 ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
68 '$PREFIX_ABS/provision', 'alpha13', configuration])
69 plantestsuite(
70 "samba4.blackbox.dbcheck.release-4-0-0", "none",
71 ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
72 '$PREFIX_ABS/provision', 'release-4-0-0', configuration])
73 plantestsuite(
74 "samba4.blackbox.dbcheck.release-4-1-0rc3", "none",
75 ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
76 '$PREFIX_ABS/provision', 'release-4-1-0rc3', configuration])
77 plantestsuite(
78 "samba4.blackbox.dbcheck.release-4-1-6-partial-object", "none",
79 ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
80 '$PREFIX_ABS/provision', 'release-4-1-6-partial-object', configuration])
81 plantestsuite(
82 "samba4.blackbox.upgradeprovision.alpha13", "none",
83 ["PYTHON=%s" % python,
84 os.path.join(bbdir, "upgradeprovision-oldrelease.sh"),
85 '$PREFIX_ABS/provision', 'alpha13', configuration])
86 plantestsuite(
87 "samba4.blackbox.upgradeprovision.release-4-0-0", "none",
88 ["PYTHON=%s" % python,
89 os.path.join(bbdir, "upgradeprovision-oldrelease.sh"),
90 '$PREFIX_ABS/provision', 'release-4-0-0', configuration])
91 planpythontestsuite("none", "samba.tests.upgradeprovision")
92 planpythontestsuite("none", "samba.tests.xattr")
93 planpythontestsuite("none", "samba.tests.ntacls")
94 planpythontestsuite("none", "samba.tests.policy")
95 plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])