From 0b86846cf3acd7046881b4fdd7d90ceacb959d7a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 3 Aug 2016 13:23:31 +0200 Subject: [PATCH 1/2] ctdb-waf: Move ctdb tests to libexec directory BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104 Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke (cherry picked from commit f9c85d04e9edb3af9479e9c83d5b1ec77b9c2ee2) --- ctdb/wscript | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ctdb/wscript b/ctdb/wscript index 3633148..65db1a0 100755 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -208,7 +208,7 @@ def configure(conf): conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX, 'share/ctdb-tests') - conf.env.CTDB_TEST_LIBDIR = os.path.join(conf.env.LIBDIR, 'ctdb-tests') + conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests') # Allow unified compilation and separate compilation of utilities # to find includes @@ -637,12 +637,12 @@ def build(bld): bld.SAMBA_BINARY(target, source=src, deps='talloc tevent tdb tevent-util', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('reqid_test', source='tests/src/reqid_test.c', deps='samba-util', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') # Test binaries ctdb_tests = [ @@ -671,7 +671,7 @@ def build(bld): source=src, includes='include', deps='ctdb-client ctdb-common ctdb-util', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('ctdb_takeover_tests', source='tests/src/ctdb_takeover_tests.c', @@ -680,21 +680,21 @@ def build(bld): ctdb-protocol''' + ib_deps, includes='include', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('ctdb_functest', source='tests/src/ctdb_functest.c', deps='''replace tdb tevent talloc popt ctdb-system samba-util tdb-wrap''', includes='include', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('ctdb_stubtest', source='tests/src/ctdb_test.c', deps='''replace tdb tevent talloc popt ctdb-system samba-util tdb-wrap''', includes='include', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') if bld.env.HAVE_INFINIBAND: bld.SAMBA_BINARY('ibwrapper_test', @@ -702,7 +702,7 @@ def build(bld): includes='include', deps='replace talloc ctdb-client ctdb-common' + ib_deps, - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') test_subdirs = [ 'complex', @@ -734,7 +734,7 @@ def build(bld): destname=os.path.join('scripts', t)) sed_expr = 's@^TEST_SCRIPTS_DIR=.*@&\\nexport TEST_BIN_DIR=\"%s\"@' % ( - bld.env.CTDB_TEST_LIBDIR) + bld.env.CTDB_TEST_LIBEXECDIR) bld.SAMBA_GENERATOR('ctdb-test-wrap', source='tests/scripts/test_wrap', target='test_wrap', @@ -743,7 +743,7 @@ def build(bld): destname='test_wrap', chmod=0755) sed_expr1 = 's@^test_dir=.*@test_dir=%s\\nexport TEST_BIN_DIR=\"%s\"@' % ( - bld.env.CTDB_TEST_DATADIR, bld.env.CTDB_TEST_LIBDIR) + bld.env.CTDB_TEST_DATADIR, bld.env.CTDB_TEST_LIBEXECDIR) sed_expr2 = 's@^\(export CTDB_TESTS_ARE_INSTALLED\)=false@\\1=true@' bld.SAMBA_GENERATOR('ctdb-test-runner', source='tests/run_tests.sh', -- 2.9.2 From a44d727ff7dc7d1837b507eaafe2742033eba66b Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 4 Aug 2016 13:36:28 +1000 Subject: [PATCH 2/2] ctdb-packaging: Move ctdb tests to libexec directory BUG: https://bugzilla.samba.org/show_bug.cgi?id=12104 Signed-off-by: Martin Schwenke Reviewed-by: Andreas Schneider (cherry picked from commit 87c38d5d741f5e58f643ad4f797c523c67bbab00) --- ctdb/packaging/RPM/ctdb.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 9d354ae..eed4a10 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -242,8 +242,8 @@ test suite for ctdb %defattr(-,root,root) %dir %{_datadir}/%{name}-tests %{_datadir}/%{name}-tests/* -%dir %{_libdir}/%{name}-tests -%{_libdir}/%{name}-tests/* +%dir %{_libexecdir}/%{name}/tests +%{_libexecdir}/%{name}/tests/* %{_bindir}/ctdb_run_tests %{_bindir}/ctdb_run_cluster_tests %doc tests/README -- 2.9.2