summaryrefslogtreecommitdiffstats
path: root/lib/tdb/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-03 10:40:45 +0100
committerAndrew Bartlett <abartlet@samba.org>2014-04-02 09:03:42 +0200
commit835c95cb77fd7e1ebff7d228fe9ab4c60baa41cd (patch)
tree9f4d0c61128280a7632eccd3add825fd4c57eaff /lib/tdb/wscript
parent2a9d5a323912d06fa84a5bc4b3481e8ca080eb56 (diff)
downloadsamba-835c95cb77fd7e1ebff7d228fe9ab4c60baa41cd.tar.gz
samba-835c95cb77fd7e1ebff7d228fe9ab4c60baa41cd.tar.xz
samba-835c95cb77fd7e1ebff7d228fe9ab4c60baa41cd.zip
tdb/wscript: maintain a global list of unit tests
This makes sure a new test is also added to 'make test' Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/tdb/wscript')
-rw-r--r--lib/tdb/wscript77
1 files changed, 32 insertions, 45 deletions
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index fc396d6d069..70196938ed2 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -17,6 +17,31 @@ import wafsamba, samba_dist, Options, Logs
samba_dist.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools')
+tdb1_unit_tests = [
+ 'run-3G-file',
+ 'run-bad-tdb-header',
+ 'run',
+ 'run-check',
+ 'run-corrupt',
+ 'run-die-during-transaction',
+ 'run-endian',
+ 'run-incompatible',
+ 'run-nested-transactions',
+ 'run-nested-traverse',
+ 'run-no-lock-during-traverse',
+ 'run-oldhash',
+ 'run-open-during-transaction',
+ 'run-readonly-check',
+ 'run-rescue',
+ 'run-rescue-find_entry',
+ 'run-rwlock-check',
+ 'run-summary',
+ 'run-transaction-expand',
+ 'run-traverse-in-transaction',
+ 'run-wronghash-fail',
+ 'run-zero-append'
+]
+
def set_options(opt):
opt.BUILTIN_DEFAULT('replace')
opt.PRIVATE_EXTENSION_DEFAULT('tdb', noextension='tdb')
@@ -115,50 +140,11 @@ def build(bld):
'replace',
includes='include')
- bld.SAMBA_BINARY('tdb1-run-3G-file', 'test/run-3G-file.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-bad-tdb-header', 'test/run-bad-tdb-header.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run', 'test/run.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-check', 'test/run-check.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-corrupt', 'test/run-corrupt.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-die-during-transaction', 'test/run-die-during-transaction.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-endian', 'test/run-endian.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-incompatible', 'test/run-incompatible.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-nested-transactions', 'test/run-nested-transactions.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-nested-traverse', 'test/run-nested-traverse.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-no-lock-during-traverse', 'test/run-no-lock-during-traverse.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-oldhash', 'test/run-oldhash.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-open-during-transaction', 'test/run-open-during-transaction.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-readonly-check', 'test/run-readonly-check.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-rescue', 'test/run-rescue.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-rescue-find_entry', 'test/run-rescue-find_entry.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-rwlock-check', 'test/run-rwlock-check.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-summary', 'test/run-summary.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-transaction-expand', 'test/run-transaction-expand.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-traverse-in-transaction', 'test/run-traverse-in-transaction.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-wronghash-fail', 'test/run-wronghash-fail.c',
- 'replace tdb-test-helpers', includes='include', install=False)
- bld.SAMBA_BINARY('tdb1-run-zero-append', 'test/run-zero-append.c',
- 'replace tdb-test-helpers', includes='include', install=False)
+ for t in tdb1_unit_tests:
+ b = "tdb1-" + t
+ s = "test/" + t + ".c"
+ bld.SAMBA_BINARY(b, s, 'replace tdb-test-helpers',
+ includes='include', install=False)
if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'):
bld.SAMBA_PYTHON('pytdb',
@@ -189,7 +175,8 @@ def testonly(ctx):
if not os.path.exists(link):
os.symlink(os.path.abspath(os.path.join(env.cwd, 'test')), link)
- for f in 'tdb1-run-3G-file', 'tdb1-run-bad-tdb-header', 'tdb1-run', 'tdb1-run-check', 'tdb1-run-corrupt', 'tdb1-run-die-during-transaction', 'tdb1-run-endian', 'tdb1-run-incompatible', 'tdb1-run-nested-transactions', 'tdb1-run-nested-traverse', 'tdb1-run-no-lock-during-traverse', 'tdb1-run-oldhash', 'tdb1-run-open-during-transaction', 'tdb1-run-readonly-check', 'tdb1-run-rescue', 'tdb1-run-rescue-find_entry', 'tdb1-run-rwlock-check', 'tdb1-run-summary', 'tdb1-run-transaction-expand', 'tdb1-run-traverse-in-transaction', 'tdb1-run-wronghash-fail', 'tdb1-run-zero-append':
+ for t in tdb1_unit_tests:
+ f = "tdb1-" + t
cmd = "cd " + testdir + " && " + os.path.abspath(os.path.join(Utils.g_module.blddir, f)) + " > test-output 2>&1"
print("..." + f)
ret = samba_utils.RUN_COMMAND(cmd)