[Telepathy-commits] [telepathy-qt4/master] tests/dbus/Makefile.am: don't build account-basics unless we can run it

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Jan 9 07:09:23 PST 2009


The account-basics test requires Python 2.5 with dbus-python
(which is substituted as TEST_PYTHON). This is not a hard dependency,
so the build and `make check` should succeed if it's missing.
---
 tests/dbus/Makefile.am |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 6054e18..3fa28c1 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -1,11 +1,9 @@
 # Tests each run under their own temporary dbus-daemon.
 
 TESTS = \
-    test-account-basics \
     test-do-nothing
 
 BUILT_SOURCES = \
-    _gen/account-basics.moc.hpp \
     _gen/do-nothing.moc.hpp
 
 _gen/%.moc.hpp: %.cpp
@@ -14,10 +12,20 @@ _gen/%.moc.hpp: %.cpp
 
 noinst_PROGRAMS = $(TESTS)
 
-test_account_basics_SOURCES = account-basics.cpp
-
 test_do_nothing_SOURCES = do-nothing.cpp
 
+if HAVE_TEST_PYTHON
+# Tests which can only be run if we have suitable versions of Python and
+# dbus-python
+TESTS += \
+    test-account-basics
+
+BUILT_SOURCES += \
+    _gen/account-basics.moc.hpp
+
+test_account_basics_SOURCES = account-basics.cpp
+endif
+
 LDADD = \
     $(QTCORE_LIBS) \
     $(QTDBUS_LIBS) \
-- 
1.5.6.5




More information about the Telepathy-commits mailing list