aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-01-23 18:00:49 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-01-23 18:00:49 +0100
commit0996bce98e7f8c1de5e0d6b3f67589ab083a4713 (patch)
tree48030a04291a8d08992648867e97cf3d96480aa4 /tests/Makefile.am
parente07deff5a9e253d9e407e75ce2293e3cbb688d12 (diff)
downloadlibayatana-indicator-0996bce98e7f8c1de5e0d6b3f67589ab083a4713.tar.gz
libayatana-indicator-0996bce98e7f8c1de5e0d6b3f67589ab083a4713.tar.bz2
libayatana-indicator-0996bce98e7f8c1de5e0d6b3f67589ab083a4713.zip
indicator-ng: more elaborate testing
Use GTestDBus to spawn a small test service (tests/indicator-test-service.c) and check whether the indicator menu gets turned into a gtkmenu correctly.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 97741b0..96825f3 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,7 +26,8 @@ EXTRA_DIST = \
session.conf.in \
service-manager-connect.service.in \
service-version-bad.service.in \
- service-version-good.service.in
+ service-version-good.service.in \
+ com.canonical.indicator.test.service.in
#############################
# Test Loader
@@ -472,6 +473,9 @@ DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT)
if USE_GTK3
+com.canonical.indicator.test.service: com.canonical.indicator.test.service.in Makefile.am
+ sed -e "s|\@builddir\@|$(abspath $(builddir))|" $< > $@
+
check_PROGRAMS += test-indicator-ng
test_indicator_ng_SOURCES = test-indicator-ng.c
@@ -480,6 +484,7 @@ test_indicator_ng_CFLAGS = \
$(LIBINDICATOR_CFLAGS) \
-I$(top_srcdir) \
-DSRCDIR="\"$(srcdir)\"" \
+ -DBUILD_DIR="\"$(abs_builddir)\"" \
-Wall
test_indicator_ng_LDADD = \
@@ -488,6 +493,17 @@ test_indicator_ng_LDADD = \
$(INDICATOR_LIB)
TESTS += test-indicator-ng
-DISTCLEANFILES = test-indicator-ng
+DISTCLEANFILES += test-indicator-ng
+
+# Mock indicator service
+check_PROGRAMS += indicator-test-service
+
+indicator_test_service_SOURCES = indicator-test-service.c
+indicator_test_service_CFLAGS = $(LIBINDICATOR_CFLAGS)
+indicator_test_service_LDADD = $(LIBINDICATOR_LIBS)
+
+EXTRA_indicator_test_service_DEPENDENCIES = com.canonical.indicator.test.service
+
+DISTCLEANFILES += indicator-test-service com.canonical.indicator.test.service
endif