1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
--- ctdb/wscript.orig 2019-05-22 10:16:26 UTC
+++ ctdb/wscript
@@ -104,6 +104,9 @@ def options(opt):
opt.add_option('--enable-ceph-reclock',
help=("Enable Ceph CTDB recovery lock helper (default=no)"),
action="store_true", dest='ctdb_ceph_reclock', default=False)
+ opt.add_option('--disable-ctdb-tests',
+ help=("Disable CTDB tests (default=no)"),
+ action="store_true", dest='ctdb_no_tests', default=False)
opt.add_option('--with-logdir',
help=("Path to log directory"),
@@ -260,7 +263,7 @@ def configure(conf):
conf.env['LIBPATH_CEPH-COMMON'] = conf.env['LIBPATH_RADOS'] + '/ceph'
if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
- conf.CHECK_LIB('rados', shlib=True)):
+ conf.CHECK_LIB('rados', shlib=True)):
conf.CHECK_LIB('ceph-common', shlib=True)
Logs.info('Building with Ceph librados recovery lock support')
conf.define('HAVE_LIBRADOS', 1)
@@ -300,8 +303,14 @@ def configure(conf):
conf.env.CTDB_VARDIR,
conf.env.CTDB_RUNDIR))
- conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
- conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
+ if Options.options.ctdb_no_tests:
+ conf.env.ctdb_tests = False
+ else:
+ conf.env.ctdb_tests = True
+
+ if conf.env.ctdb_tests:
+ conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
+ conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
# Allow unified compilation and separate compilation of utilities
# to find includes
@@ -679,9 +688,9 @@ def build(bld):
if bld.env.HAVE_LIBRADOS:
bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
- deps='talloc tevent rados ceph-common',
- includes='include',
- install_path='${CTDB_HELPER_BINDIR}')
+ deps='talloc tevent rados ceph-common',
+ includes='include',
+ install_path='${CTDB_HELPER_BINDIR}')
sed_expr1 = 's|/usr/local/var/lib/ctdb|%s|g' % (bld.env.CTDB_VARDIR)
sed_expr2 = 's|/usr/local/etc/ctdb|%s|g' % (bld.env.CTDB_ETCDIR)
@@ -858,6 +867,9 @@ def build(bld):
for d in ['volatile', 'persistent', 'state']:
bld.INSTALL_DIR(os.path.join(bld.env.CTDB_VARDIR, d))
+ if not bld.env.ctdb_tests:
+ return
+
bld.SAMBA_BINARY('errcode',
source='tests/src/errcode.c',
deps='replace',
|