[next] telepathy-salut: Install tests to /usr/ lib so we can include the test plugin

Simon McVittie smcv at kemper.freedesktop.org
Mon May 12 03:56:46 PDT 2014


Module: telepathy-salut
Branch: next
Commit: 1ab3f6d6e54ba592947b5f3b67365ff861eb6468
URL:    http://cgit.freedesktop.org/telepathy/telepathy-salut/commit/?id=1ab3f6d6e54ba592947b5f3b67365ff861eb6468

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Mon May 12 11:26:24 2014 +0100

Install tests to /usr/lib so we can include the test plugin

---

 plugins/Makefile.am             |   17 ++++++++++++++---
 tests/twisted/Makefile.am       |    2 +-
 tests/twisted/run-test.sh.in    |    3 +++
 tests/twisted/tools/Makefile.am |    2 +-
 4 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 5325b93..8227259 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,6 +1,16 @@
+testsdir = ${libdir}/telepathy-salut-1-tests
+twistedtestsdir = ${testsdir}/twisted
+
+noinst_LTLIBRARIES =
+
 # testing-only plugins
-noinst_LTLIBRARIES = \
+if ENABLE_INSTALLED_TESTS
+twistedtests_LTLIBRARIES = \
 	test.la
+else
+noinst_LTLIBRARIES += \
+	test.la
+endif
 
 installable_plugins =
 	$(NULL)
@@ -19,8 +29,9 @@ test_la_SOURCES = \
     test.c \
     test.h
 
-# because test.la is not installed, libtool will want to compile it as static
-# despite -shared (a convenience library), unless we also use -rpath
+# because test.la is not necessarily installed, libtool will want to compile
+# it as static despite -shared (a convenience library), unless we also
+# use -rpath
 test_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(pluginexecdir)
 
 AM_CFLAGS = $(ERROR_CFLAGS) \
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index f83cc64..698a1f4 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -99,7 +99,7 @@ BUILT_SOURCES = \
 	$(built_test_scripts) \
 	$(NULL)
 
-testsdir = ${datadir}/telepathy-salut-1-tests
+testsdir = ${libdir}/telepathy-salut-1-tests
 twistedtestsdir = ${testsdir}/twisted
 
 if ENABLE_INSTALLED_TESTS
diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in
index e3c7bde..0df6fc2 100644
--- a/tests/twisted/run-test.sh.in
+++ b/tests/twisted/run-test.sh.in
@@ -30,6 +30,9 @@ if test "x$CHECK_TWISTED_UNINSTALLED" = x; then
 
   PYTHONPATH="${G_TEST_SRCDIR}"
   export PYTHONPATH
+
+  SALUT_PLUGIN_DIR="${G_TEST_BUILDDIR}"
+  export SALUT_PLUGIN_DIR
 else
   if ! test -d "$G_TEST_SRCDIR"; then
     echo "Bail out! G_TEST_SRCDIR must be set and absolute"
diff --git a/tests/twisted/tools/Makefile.am b/tests/twisted/tools/Makefile.am
index 206b993..eaa8317 100644
--- a/tests/twisted/tools/Makefile.am
+++ b/tests/twisted/tools/Makefile.am
@@ -71,7 +71,7 @@ CLEANFILES = \
     $(BUILT_SOURCES) \
     salut-testing.log
 
-testsdir = ${datadir}/telepathy-salut-1-tests
+testsdir = ${libdir}/telepathy-salut-1-tests
 twistedtestsdir = ${testsdir}/twisted
 twistedtoolsdir = ${twistedtestsdir}/tools
 



More information about the telepathy-commits mailing list