Revert "ctdb: fix autotest with socket-wrapper installed in the system"
authorMichael Adam <obnox@samba.org>
Fri, 8 Jul 2016 23:17:24 +0000 (01:17 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 8 Jul 2016 23:17:24 +0000 (01:17 +0200)
This reverts commit 3c598cbee262b6f91bf736d22f11dc302af3decd.

ctdb/wscript

index 9f0f1e1d2e55fd2db8d3ff615aeb67da99acc8dc..3eae06653dd759fd3add75f965cb5226812ed437 100755 (executable)
@@ -107,16 +107,6 @@ def configure(conf):
     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')
-        using_system_socket_wrapper = conf.CONFIG_GET('USING_SYSTEM_SOCKET_WRAPPER')
-        if not using_system_socket_wrapper and conf.env.standalone_ctdb:
-            #
-            # We need to override the path here, as otherwise the 'ctdb' subdir
-            # is missing. This is because the socket_wrapper wscript constructs
-            # the path from the conf.srcdir, and this is not populated from the
-            # the cwd but from the location of waf.
-            #
-            conf.env.SOCKET_WRAPPER_SO_PATH = '%s/bin/shared/libsocket-wrapper.so' % os.getcwd()
 
     conf.CHECK_HEADERS('sched.h')
     conf.CHECK_HEADERS('procinfo.h')
@@ -826,8 +816,7 @@ def test(ctx):
 
 
 def autotest(ctx):
-    env = samba_utils.LOAD_ENVIRONMENT()
-    ld = 'LD_PRELOAD=%s' % env.SOCKET_WRAPPER_SO_PATH
+    ld = 'LD_PRELOAD=%s/bin/shared/libsocket-wrapper.so' % os.getcwd()
     cmd = '%s tests/run_tests.sh -e -S -C' % ld
     ret = samba_utils.RUN_COMMAND(cmd)
     if ret != 0: