summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-05-12 11:26:24 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-05-12 11:26:24 +0100
commit1ab3f6d6e54ba592947b5f3b67365ff861eb6468 (patch)
tree9810a3d41813e7ba898bedf0163b66854854a727
parent6456b84a6452e528f0f8eb8878f7ef9713f2500b (diff)
downloadtelepathy-salut-1ab3f6d6e54ba592947b5f3b67365ff861eb6468.tar.gz
Install tests to /usr/lib so we can include the test plugin
-rw-r--r--plugins/Makefile.am17
-rw-r--r--tests/twisted/Makefile.am2
-rw-r--r--tests/twisted/run-test.sh.in3
-rw-r--r--tests/twisted/tools/Makefile.am2
4 files changed, 19 insertions, 5 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 5325b93f..82272595 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 f83cc64f..698a1f49 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 e3c7bde4..0df6fc26 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 206b993c..eaa83179 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