6539dc
From eb09689c3c1eeae14eeb08352c5342d89b7bf96d Mon Sep 17 00:00:00 2001
6539dc
From: Andreas Schneider <asn@samba.org>
6539dc
Date: Wed, 3 Aug 2016 13:23:31 +0200
6539dc
Subject: [PATCH] ctdb-waf: Move ctdb tests to libexec directory
6539dc
6539dc
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104
6539dc
6539dc
Signed-off-by: Andreas Schneider <asn@samba.org>
6539dc
Reviewed-by: Martin Schwenke <martin@meltin.net>
6539dc
6539dc
(cherry picked from commit f9c85d04e9edb3af9479e9c83d5b1ec77b9c2ee2)
6539dc
---
6539dc
 ctdb/wscript | 20 ++++++++++----------
6539dc
 1 file changed, 10 insertions(+), 10 deletions(-)
6539dc
6539dc
diff --git a/ctdb/wscript b/ctdb/wscript
6539dc
index 5739269..a6d1e68 100755
6539dc
--- a/ctdb/wscript
6539dc
+++ b/ctdb/wscript
6539dc
@@ -208,7 +208,7 @@ def configure(conf):
6539dc
 
6539dc
     conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX,
6539dc
                                               'share/ctdb-tests')
6539dc
-    conf.env.CTDB_TEST_LIBDIR = os.path.join(conf.env.LIBDIR, 'ctdb-tests')
6539dc
+    conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
6539dc
 
6539dc
     # Allow unified compilation and separate compilation of utilities
6539dc
     # to find includes
6539dc
@@ -637,12 +637,12 @@ def build(bld):
6539dc
         bld.SAMBA_BINARY(target,
6539dc
                          source=src,
6539dc
                          deps='talloc tevent tdb tevent-unix-util',
6539dc
-                         install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                         install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     bld.SAMBA_BINARY('reqid_test',
6539dc
                      source='tests/src/reqid_test.c',
6539dc
                      deps='samba-util',
6539dc
-                     install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     # Test binaries
6539dc
     ctdb_tests = [
6539dc
@@ -671,7 +671,7 @@ def build(bld):
6539dc
                          source=src,
6539dc
                          includes='include',
6539dc
                          deps='ctdb-client ctdb-common ctdb-util',
6539dc
-                         install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                         install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     bld.SAMBA_BINARY('ctdb_takeover_tests',
6539dc
                      source='tests/src/ctdb_takeover_tests.c',
6539dc
@@ -680,21 +680,21 @@ def build(bld):
6539dc
                              ctdb-protocol''' +
6539dc
                           ib_deps,
6539dc
                      includes='include',
6539dc
-                     install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     bld.SAMBA_BINARY('ctdb_functest',
6539dc
                      source='tests/src/ctdb_functest.c',
6539dc
                      deps='''replace tdb tevent talloc popt ctdb-system
6539dc
                              samba-util tdb-wrap''',
6539dc
                      includes='include',
6539dc
-                     install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     bld.SAMBA_BINARY('ctdb_stubtest',
6539dc
                      source='tests/src/ctdb_test.c',
6539dc
                      deps='''replace tdb tevent talloc popt ctdb-system
6539dc
                              samba-util tdb-wrap''',
6539dc
                      includes='include',
6539dc
-                     install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                     install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     if bld.env.HAVE_INFINIBAND:
6539dc
         bld.SAMBA_BINARY('ibwrapper_test',
6539dc
@@ -702,7 +702,7 @@ def build(bld):
6539dc
                          includes='include',
6539dc
                          deps='replace talloc ctdb-client ctdb-common' +
6539dc
                               ib_deps,
6539dc
-                         install_path='${CTDB_TEST_LIBDIR}')
6539dc
+                         install_path='${CTDB_TEST_LIBEXECDIR}')
6539dc
 
6539dc
     test_subdirs = [
6539dc
         'complex',
6539dc
@@ -734,7 +734,7 @@ def build(bld):
6539dc
                           destname=os.path.join('scripts', t))
6539dc
 
6539dc
     sed_expr = 's@^TEST_SCRIPTS_DIR=.*@&\\nexport TEST_BIN_DIR=\"%s\"@' % (
6539dc
-               bld.env.CTDB_TEST_LIBDIR)
6539dc
+               bld.env.CTDB_TEST_LIBEXECDIR)
6539dc
     bld.SAMBA_GENERATOR('ctdb-test-wrap',
6539dc
                         source='tests/scripts/test_wrap',
6539dc
                         target='test_wrap',
6539dc
@@ -743,7 +743,7 @@ def build(bld):
6539dc
                       destname='test_wrap', chmod=0755)
6539dc
 
6539dc
     sed_expr1 = 's@^test_dir=.*@test_dir=%s\\nexport TEST_BIN_DIR=\"%s\"@' % (
6539dc
-                bld.env.CTDB_TEST_DATADIR, bld.env.CTDB_TEST_LIBDIR)
6539dc
+                bld.env.CTDB_TEST_DATADIR, bld.env.CTDB_TEST_LIBEXECDIR)
6539dc
     sed_expr2 = 's@^\(export CTDB_TESTS_ARE_INSTALLED\)=false@\\1=true@'
6539dc
     bld.SAMBA_GENERATOR('ctdb-test-runner',
6539dc
                         source='tests/run_tests.sh',
6539dc
-- 
6539dc
2.9.2
6539dc