aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-11-03 10:52:39 -0600
committerTed Gould <ted@canonical.com>2009-11-03 10:52:39 -0600
commitbe7d032e77b2c1140da0d5acee697150cb1a9a2b (patch)
treeb3c848798228e96f2d2d6ab6b5d865e0a58072d2 /tests/Makefile.am
parent20d116ae0d74559cd5f30fe4f1bff08ed6378176 (diff)
parentcd7ec27751fbaaae47fc1ddf560f88e5921ce80d (diff)
downloadlibayatana-appindicator-be7d032e77b2c1140da0d5acee697150cb1a9a2b.tar.gz
libayatana-appindicator-be7d032e77b2c1140da0d5acee697150cb1a9a2b.tar.bz2
libayatana-appindicator-be7d032e77b2c1140da0d5acee697150cb1a9a2b.zip
Fleshing out the library so that the interface is implemented. Also tests for the library.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am84
1 files changed, 84 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..f6a0525
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,84 @@
+
+check_PROGRAMS = \
+ test-libcustomindicator \
+ test-libcustomindicator-dbus-client \
+ test-libcustomindicator-dbus-server
+
+TESTS =
+DISTCLEANFILES = $(TESTS)
+
+#########################################
+## test-libcustomindicator
+#########################################
+
+test_libcustomindicator_SOURCES = \
+ test-libcustomindicator.c
+
+test_libcustomindicator_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src
+
+test_libcustomindicator_LDADD = \
+ $(INDICATOR_LIBS) \
+ $(top_builddir)/src/libcustomindicator.la
+
+#########################################
+## test-libcustomindicator-dbus-client
+#########################################
+
+test_libcustomindicator_dbus_client_SOURCES = \
+ test-defines.h \
+ test-libcustomindicator-dbus-client.c
+
+test_libcustomindicator_dbus_client_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src
+
+test_libcustomindicator_dbus_client_LDADD = \
+ $(INDICATOR_LIBS) \
+ $(top_builddir)/src/libcustomindicator.la
+
+#########################################
+## test-libcustomindicator-dbus-server
+#########################################
+
+test_libcustomindicator_dbus_server_SOURCES = \
+ test-defines.h \
+ test-libcustomindicator-dbus-server.c
+
+test_libcustomindicator_dbus_server_CFLAGS = \
+ $(INDICATOR_CFLAGS) \
+ -Wall -Werror \
+ -I$(top_srcdir)/src
+
+test_libcustomindicator_dbus_server_LDADD = \
+ $(INDICATOR_LIBS) \
+ $(top_builddir)/src/libcustomindicator.la
+
+#########################################
+## Actual tests
+#########################################
+
+XML_REPORT = libcustomindicator-check-results.xml
+HTML_REPORT = libcustomindicator-check-results.html
+
+libcustomindicator-tests: test-libcustomindicator
+ @echo "#!/bin/sh" > libcustomindicator-tests
+ @echo gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator >> libcustomindicator-tests
+ @chmod +x libcustomindicator-tests
+
+TESTS += libcustomindicator-tests
+DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT)
+
+
+DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
+
+test-libcustomindicator-dbus: test-libcustomindicator-dbus-client test-libcustomindicator-dbus-server Makefile.am
+ @echo "#!/bin/sh" > test-libcustomindicator-dbus
+ @echo $(DBUS_RUNNER) --task ./test-libcustomindicator-dbus-client --task-name Client --task ./test-libcustomindicator-dbus-server --task-name Server --ignore-return >> test-libcustomindicator-dbus
+ @chmod +x test-libcustomindicator-dbus
+
+TESTS += test-libcustomindicator-dbus
+