ctdb-build: Specify absolute path to libsocket-wrapper.so
authorAmitay Isaacs <amitay@gmail.com>
Wed, 4 Mar 2015 04:55:15 +0000 (15:55 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 4 Mar 2015 12:11:53 +0000 (13:11 +0100)
Specifying a relative path to LD_PRELOAD can fail if any of the test
scripts uses cd to change directory and execute commands.

Adding statd-callout tests breaks autotest since statd-callout does "cd".

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Mar  4 13:11:53 CET 2015 on sn-devel-104

ctdb/wscript

index 07651f1c7c2cd9c497c53110236a4d2c9cb639f0..5957f16d511be556a4b5612f4088f306d103309d 100755 (executable)
@@ -654,7 +654,8 @@ def test(ctx):
 
 
 def autotest(ctx):
-    cmd = 'LD_PRELOAD=bin/shared/libsocket-wrapper.so tests/run_tests.sh -e -S -C'
+    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:
         print('autotest exited with exit status %d' % ret)