aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-04 15:52:59 +0000
committerConor Curran <conor.curran@canonical.com>2010-03-04 15:52:59 +0000
commit17dd0fee623ff8552b5635fdc570e0aee8635fd6 (patch)
tree30f7be78f9b82383383aa8f54e84ab3a5c29b8d3 /tests/Makefile.am
parentcb864e17102163154fa313d5f9344e9c6c2cbe16 (diff)
parente2a152628f20271f5373702ad88fda483e0403ca (diff)
downloadayatana-indicator-sound-17dd0fee623ff8552b5635fdc570e0aee8635fd6.tar.gz
ayatana-indicator-sound-17dd0fee623ff8552b5635fdc570e0aee8635fd6.tar.bz2
ayatana-indicator-sound-17dd0fee623ff8552b5635fdc570e0aee8635fd6.zip
merge with the test branch - service side refactored and tests introduced
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am95
1 files changed, 95 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..a0b990b
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,95 @@
+
+check_PROGRAMS = \
+ test-indicator-sound \
+ test-indicator-sound-dbus-client \
+ test-indicator-sound-dbus-server
+
+TESTS =
+DISTCLEANFILES = $(TESTS)
+
+#########################################
+## test-indicator-sound
+#########################################
+test_indicator_sound_SOURCES = \
+ test-indicator-sound.c \
+ $(top_builddir)/src/indicator-sound.c
+
+test_indicator_sound_CFLAGS = \
+ $(APPLET_CFLAGS) \
+ -Wall -Werror \
+ -I$(srcdir) \
+ -DTOP_BUILD_DIR="\"${abs_top_builddir}\""
+
+test_indicator_sound_LDADD = \
+ $(APPLET_LIBS)
+
+
+#########################################
+## test-indicator-sound-dbus-client
+#########################################
+test_indicator_sound_dbus_client_SOURCES = \
+ test-defines.h \
+ test-indicator-sound-dbus-client.c
+
+test_indicator_sound_dbus_client_CFLAGS = \
+ $(SOUNDSERVICE_CFLAGS) \
+ -Wall -Werror \
+ -I$(srcdir)
+
+test_indicator_sound_dbus_client_LDADD = \
+ $(SOUNDSERVICE_LIBS)
+
+########################################
+# test-indicator-sound-dbus-server
+########################################
+test_indicator_sound_dbus_server_SOURCES = \
+ test-defines.h \
+ test-indicator-sound-dbus-server.c \
+ $(top_builddir)/src/sound-service-dbus.c \
+ $(top_builddir)/src/pulse-manager.c \
+ $(top_builddir)/src/slider-menu-item.c \
+ $(top_builddir)/src/dbus-menu-manager.c
+
+test_indicator_sound_dbus_server_CFLAGS = \
+ $(SOUNDSERVICE_CFLAGS) \
+ -Wall -Werror \
+ -I$(srcdir)
+
+test_indicator_sound_dbus_server_LDADD = \
+ $(SOUNDSERVICE_LIBS)
+
+
+#########################################
+## Actual tests
+#########################################
+
+XML_REPORT = indicator-sound-check-results.xml
+HTML_REPORT = indicator-sound-check-results.html
+
+indicator-sound-tests: indicator-sound-tests-gtester Makefile.am
+ @echo "#!/bin/sh" > $@
+ @echo $(DBUS_RUNNER) --task ./indicator-sound-tests-gtester >> $@
+ @chmod +x $@
+
+indicator-sound-tests-gtester: test-indicator-sound Makefile.am
+ @echo "#!/bin/sh" > $@
+ @echo gtester -k --verbose -o=$(XML_REPORT) ./test-indicator-sound >> $@
+ @chmod +x $@
+
+TESTS += indicator-sound-tests
+
+DISTCLEANFILES += $(XML_REPORT) $(HTML_REPORT) indicator-sound-tests-gtester
+
+DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
+
+test-indicator-sound-dbus: test-indicator-sound-dbus-client test-indicator-sound-dbus-server Makefile.am
+ @echo "#!/bin/sh" > test-indicator-sound-dbus
+ @echo $(DBUS_RUNNER) --task ./test-indicator-sound-dbus-client --task-name Client --task ./test-indicator-sound-dbus-server --task-name Server --ignore-return >> test-indicator-sound-dbus
+ @chmod +x test-indicator-sound-dbus
+
+TESTS += test-indicator-sound-dbus
+
+
+
+
+