selftest: Add test for link and deleted link behaviour in dbcheck
[metze/samba/wip.git] / selftest / tests.py
1 #!/usr/bin/python
2 # This script generates a list of testsuites that should be run as part of
3 # the Samba test suite.
4
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".
8
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.
15
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.
20
21 from selftesthelpers import *
22
23 try:
24     config_h = os.environ["CONFIG_H"]
25 except KeyError:
26     samba4bindir = bindir()
27     config_h = os.path.join(samba4bindir, "default/include/config.h")
28
29 # define here var to check what we support
30 f = open(config_h, 'r')
31 try:
32     have_man_pages_support = ("XSLTPROC_MANPAGES 1" in f.read())
33 finally:
34     f.close()
35
36 planpythontestsuite("none", "samba.tests.source")
37 if have_man_pages_support:
38     planpythontestsuite("none", "samba.tests.docs")
39
40 try:
41     import testscenarios
42 except ImportError:
43     skiptestsuite("subunit", "testscenarios not available")
44 else:
45     planpythontestsuite("none", "subunit.tests.test_suite")
46 planpythontestsuite("none", "samba.tests.blackbox.ndrdump")
47 planpythontestsuite("none", "api", name="ldb.python", extra_path=['lib/ldb/tests/python'])
48 planpythontestsuite("none", "samba.tests.credentials")
49 planpythontestsuite("none", "samba.tests.registry")
50 planpythontestsuite("none", "samba.tests.auth")
51 planpythontestsuite("none", "samba.tests.get_opt")
52 planpythontestsuite("none", "samba.tests.security")
53 planpythontestsuite("none", "samba.tests.dcerpc.misc")
54 planpythontestsuite("none", "samba.tests.dcerpc.integer")
55 planpythontestsuite("none", "samba.tests.param")
56 planpythontestsuite("none", "samba.tests.upgrade")
57 planpythontestsuite("none", "samba.tests.core")
58 planpythontestsuite("none", "samba.tests.provision")
59 planpythontestsuite("none", "samba.tests.samba3")
60 planpythontestsuite("none", "samba.tests.strings")
61 planpythontestsuite("none", "samba.tests.netcmd")
62 planpythontestsuite("none", "samba.tests.dcerpc.rpc_talloc")
63 planpythontestsuite("none", "samba.tests.dcerpc.array")
64 planpythontestsuite("none", "samba.tests.dcerpc.string")
65 planpythontestsuite("none", "samba.tests.hostconfig")
66 planpythontestsuite("ad_dc_ntvfs:local", "samba.tests.messaging")
67 planpythontestsuite("none", "samba.tests.samba3sam")
68 planpythontestsuite(
69     "none", "wafsamba.tests.test_suite",
70     extra_path=[os.path.join(samba4srcdir, "..", "buildtools"),
71                 os.path.join(samba4srcdir, "..", "third_party", "waf", "wafadmin")])
72 plantestsuite(
73     "samba4.blackbox.demote-saveddb", "none",
74     ["PYTHON=%s" % python, os.path.join(bbdir, "demote-saveddb.sh"),
75      '$PREFIX_ABS/demote', configuration])
76 plantestsuite(
77     "samba4.blackbox.dbcheck.alpha13", "none",
78     ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
79      '$PREFIX_ABS/provision', 'alpha13', configuration])
80 plantestsuite(
81     "samba4.blackbox.dbcheck.release-4-0-0", "none",
82     ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
83      '$PREFIX_ABS/provision', 'release-4-0-0', configuration])
84 plantestsuite(
85     "samba4.blackbox.dbcheck.release-4-1-0rc3", "none",
86     ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
87      '$PREFIX_ABS/provision', 'release-4-1-0rc3', configuration])
88 plantestsuite(
89     "samba4.blackbox.dbcheck.release-4-1-6-partial-object", "none",
90     ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck-oldrelease.sh"),
91      '$PREFIX_ABS/provision', 'release-4-1-6-partial-object', configuration])
92 plantestsuite(
93     "samba4.blackbox.dbcheck.release-4-5-0-pre1", "none",
94     ["PYTHON=%s" % python,
95      os.path.join(bbdir, "dbcheck-oldrelease.sh"),
96      '$PREFIX_ABS/provision', 'release-4-5-0-pre1', configuration])
97 plantestsuite(
98     "samba4.blackbox.upgradeprovision.alpha13", "none",
99     ["PYTHON=%s" % python,
100      os.path.join(bbdir, "upgradeprovision-oldrelease.sh"),
101      '$PREFIX_ABS/provision', 'alpha13', configuration])
102 plantestsuite(
103     "samba4.blackbox.upgradeprovision.release-4-0-0", "none",
104     ["PYTHON=%s" % python,
105      os.path.join(bbdir, "upgradeprovision-oldrelease.sh"),
106      '$PREFIX_ABS/provision', 'release-4-0-0', configuration])
107 plantestsuite(
108     "samba4.blackbox.tombstones-expunge.release-4-5-0-pre1", "none",
109     ["PYTHON=%s" % python,
110      os.path.join(bbdir, "tombstones-expunge.sh"),
111      '$PREFIX_ABS/provision', 'release-4-5-0-pre1', configuration])
112 plantestsuite(
113     "samba4.blackbox.dbcheck-links.release-4-5-0-pre1", "none",
114     ["PYTHON=%s" % python,
115      os.path.join(bbdir, "dbcheck-links.sh"),
116      '$PREFIX_ABS/provision', 'release-4-5-0-pre1', configuration])
117 planpythontestsuite("none", "samba.tests.upgradeprovision")
118 planpythontestsuite("none", "samba.tests.xattr")
119 planpythontestsuite("none", "samba.tests.ntacls")
120 planpythontestsuite("none", "samba.tests.policy")
121 planpythontestsuite("none", "samba.tests.kcc.graph")
122 planpythontestsuite("none", "samba.tests.kcc.graph_utils")
123 planpythontestsuite("none", "samba.tests.kcc.kcc_utils")
124 planpythontestsuite("none", "samba.tests.kcc.ldif_import_export")
125 plantestsuite("wafsamba.duplicate_symbols", "none", [os.path.join(srcdir(), "buildtools/wafsamba/test_duplicate_symbol.sh")])