From 0bda48dee1152e9b0beb250f915b07dfb612c3b1 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 | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ctdb/wscript b/ctdb/wscript index d7174dd..1e80e01 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -210,7 +210,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 @@ -666,27 +666,27 @@ def build(bld): source=src, deps='''talloc tevent tdb tevent-util LIBASYNC_REQ samba-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}') bld.SAMBA_BINARY('rb_test', source='tests/src/rb_test.c', deps='samba-util talloc', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('ctdb_packet_parse', source='tests/src/ctdb_packet_parse.c', deps='talloc tevent tdb ctdb-protocol', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('porting_tests', source='tests/src/porting_tests.c', deps='samba-util ctdb-system popt', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_SUBSYSTEM('ctdb-tests-common', @@ -717,7 +717,7 @@ def build(bld): includes='include', deps='''ctdb-client2 ctdb-protocol ctdb-util samba-util ctdb-tests-common''', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('ctdb_takeover_tests', source='tests/src/ctdb_takeover_tests.c', @@ -725,13 +725,13 @@ def build(bld): samba-util tdb-wrap talloc_report ctdb-ipalloc ctdb-protocol ctdb-util''', includes='include', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') bld.SAMBA_BINARY('fake_ctdbd', source='tests/src/fake_ctdbd.c', deps='''ctdb-util ctdb-protocol ctdb-system samba-util tevent-util LIBASYNC_REQ popt''', - install_path='${CTDB_TEST_LIBDIR}') + install_path='${CTDB_TEST_LIBEXECDIR}') if bld.env.HAVE_INFINIBAND: bld.SAMBA_BINARY('ibwrapper_test', @@ -739,7 +739,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', @@ -772,7 +772,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', @@ -789,7 +789,7 @@ def build(bld): destname='script_install_paths.sh', chmod=0644) 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 069924f292eee9ae2e7e43a3ac2c8c4baf757f28 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 b439e27..28af1d0 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -248,8 +248,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