mirror of
https://git.freebsd.org/ports.git
synced 2025-06-20 20:20:30 -04:00
62 lines
2.7 KiB
Text
62 lines
2.7 KiB
Text
--- ctdb/wscript.orig 2018-08-24 11:58:20 UTC
|
|
+++ ctdb/wscript
|
|
@@ -90,6 +90,9 @@ def set_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"),
|
|
@@ -231,7 +234,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)
|
|
@@ -268,9 +271,15 @@ def configure(conf):
|
|
conf.env.CTDB_VARDIR,
|
|
conf.env.CTDB_RUNDIR))
|
|
|
|
- conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX,
|
|
+ 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.EXEC_PREFIX,
|
|
'share/ctdb/tests')
|
|
- conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/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
|
|
@@ -605,9 +614,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)
|
|
@@ -750,6 +759,9 @@ def build(bld):
|
|
bld.install_dir(bld.env.CTDB_RUNDIR)
|
|
bld.install_dir(bld.env.CTDB_VARDIR)
|
|
|
|
+ if not bld.env.ctdb_tests:
|
|
+ return
|
|
+
|
|
# Unit tests
|
|
ctdb_unit_tests = [
|
|
'db_hash_test',
|