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)
committerKarolin Seeger <kseeger@samba.org>
Mon, 27 Apr 2015 21:54:48 +0000 (23:54 +0200)
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".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11204

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
(cherry picked from commit 7a10e077706efd3b5d2ce024084b7ed97d4cd36c)

ctdb/wscript

index 281b73574dc905a994d39ab2d103d1ae055e8d1f..104fc9afd8df24feebf5b717df16ed207a86c028 100755 (executable)
@@ -649,7 +649,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)