conf.RECURSE('lib/tdb')
if conf.env.standalone_ctdb or conf.CONFIG_GET('ENABLE_SELFTEST'):
conf.RECURSE('lib/socket_wrapper')
+ conf.env.SOCKET_WRAPPER_SO_PATH = conf.CONFIG_GET('LIBSOCKET_WRAPPER_SO_PATH')
conf.CHECK_HEADERS('sched.h')
conf.CHECK_HEADERS('procinfo.h')
def autotest(ctx):
- ld = 'LD_PRELOAD=%s/bin/shared/libsocket-wrapper.so' % os.getcwd()
+ env = samba_utils.LOAD_ENVIRONMENT()
+ swrap_so_path = env.SOCKET_WRAPPER_SO_PATH
+ if not swrap_so_path:
+ swrap_so_path = "libsocket-wrapper.so"
+ elif env.standalone_ctdb:
+ # Need to override the path here, otherwise the 'ctdb' subdir is
+ # missing and I don't know why...
+ swrap_so_path = '%s/bin/shared/libsocket-wrapper.so' % os.getcwd()
+ ld = 'LD_PRELOAD=%s' % swrap_so_path
cmd = '%s tests/run_tests.sh -e -S -C' % ld
ret = samba_utils.RUN_COMMAND(cmd)
if ret != 0: