From 5e928c9ce0cbeaa1a1050a7c0e8f10fb7027514c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 20 Oct 2009 23:47:20 -0500 Subject: Now we're building a test, woot! --- .bzrignore | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.bzrignore') diff --git a/.bzrignore b/.bzrignore index 8470e82..d413452 100644 --- a/.bzrignore +++ b/.bzrignore @@ -15,3 +15,8 @@ src/libcustomindicator/custom-indicator-enum-types.h src/libcustomindicator/custom-indicator-enum-types.c src/stamp-enum-types src/libcustomindicator_la-custom-indicator-enum-types.lo +tests/.deps +tests/.libs +tests/libcustomindicator-check-results.xml +tests/libcustomindicator-check-results.html +tests/test-libcustomindicator -- cgit v1.2.3 From bca9b7ee96632e7c89092184c174b45722e0511c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 22 Oct 2009 09:20:36 -0500 Subject: Adding in two little client server binaries for testing the custom indicator. --- .bzrignore | 2 ++ tests/Makefile.am | 46 ++++++++++++++++++++++++++++- tests/test-defines.h | 7 +++++ tests/test-libcustomindicator-dbus-client.c | 11 +++++++ tests/test-libcustomindicator-dbus-server.c | 11 +++++++ 5 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 tests/test-defines.h create mode 100644 tests/test-libcustomindicator-dbus-client.c create mode 100644 tests/test-libcustomindicator-dbus-server.c (limited to '.bzrignore') diff --git a/.bzrignore b/.bzrignore index d413452..6c0da1f 100644 --- a/.bzrignore +++ b/.bzrignore @@ -20,3 +20,5 @@ tests/.libs tests/libcustomindicator-check-results.xml tests/libcustomindicator-check-results.html tests/test-libcustomindicator +tests/test-libcustomindicator-dbus-client +tests/test-libcustomindicator-dbus-server diff --git a/tests/Makefile.am b/tests/Makefile.am index 865573b..8327a79 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,12 @@ check_PROGRAMS = \ - test-libcustomindicator + test-libcustomindicator \ + test-libcustomindicator-dbus-client \ + test-libcustomindicator-dbus-server + +######################################### +## test-libcustomindicator +######################################### test_libcustomindicator_SOURCES = \ test-libcustomindicator.c @@ -14,6 +20,44 @@ 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 diff --git a/tests/test-defines.h b/tests/test-defines.h new file mode 100644 index 0000000..b68d9fc --- /dev/null +++ b/tests/test-defines.h @@ -0,0 +1,7 @@ + +#define TEST_ID "my-id" +#define TEST_ICON_NAME "my-icon-name" +#define TEST_ATTENTION_ICON_NAME "my-attention-icon-name" +#define TEST_STATE CUSTOM_INDICATOR_STATE_ACTIVE +#define TEST_CATEGORY CUSTOM_INDICATOR_CATEGORY_APPLICATION_STATUS + diff --git a/tests/test-libcustomindicator-dbus-client.c b/tests/test-libcustomindicator-dbus-client.c new file mode 100644 index 0000000..7c3de86 --- /dev/null +++ b/tests/test-libcustomindicator-dbus-client.c @@ -0,0 +1,11 @@ + +#include +#include +#include "test-defines.h" + +gint +main (gint argc, gchar * argv[]) +{ + + return 0; +} diff --git a/tests/test-libcustomindicator-dbus-server.c b/tests/test-libcustomindicator-dbus-server.c new file mode 100644 index 0000000..7c3de86 --- /dev/null +++ b/tests/test-libcustomindicator-dbus-server.c @@ -0,0 +1,11 @@ + +#include +#include +#include "test-defines.h" + +gint +main (gint argc, gchar * argv[]) +{ + + return 0; +} -- cgit v1.2.3 From 23b72422d828dd77909f6cc11947f9fb5e8cee2c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 22 Oct 2009 09:30:59 -0500 Subject: Switching to using a little autotest as well. --- .bzrignore | 2 ++ tests/Makefile.am | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) (limited to '.bzrignore') diff --git a/.bzrignore b/.bzrignore index 6c0da1f..7121e6e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -22,3 +22,5 @@ tests/libcustomindicator-check-results.html tests/test-libcustomindicator tests/test-libcustomindicator-dbus-client tests/test-libcustomindicator-dbus-server +tests/libcustomindicator-tests +tests/test-libcustomindicator-dbus diff --git a/tests/Makefile.am b/tests/Makefile.am index 8327a79..f6a0525 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,6 +4,9 @@ check_PROGRAMS = \ test-libcustomindicator-dbus-client \ test-libcustomindicator-dbus-server +TESTS = +DISTCLEANFILES = $(TESTS) + ######################################### ## test-libcustomindicator ######################################### @@ -61,10 +64,21 @@ test_libcustomindicator_dbus_server_LDADD = \ XML_REPORT = libcustomindicator-check-results.xml HTML_REPORT = libcustomindicator-check-results.html -libcustomindicator-tester: test-libcustomindicator - gtester -k --verbose -o=$(XML_REPORT) ./test-libcustomindicator +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 -check-local: libcustomindicator-tester +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 -DISTCLEANFILES = $(XML_REPORT) $(HTML_REPORT) +TESTS += test-libcustomindicator-dbus -- cgit v1.2.3 From ec8cd6885a17a2a03fc65c89f6e10f3da42b59de Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 28 Oct 2009 14:52:08 -0500 Subject: Adding the custom-service interface. --- .bzrignore | 2 ++ src/Makefile.am | 1 + src/custom-service.xml | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/custom-service.xml (limited to '.bzrignore') diff --git a/.bzrignore b/.bzrignore index 7121e6e..f41b607 100644 --- a/.bzrignore +++ b/.bzrignore @@ -24,3 +24,5 @@ tests/test-libcustomindicator-dbus-client tests/test-libcustomindicator-dbus-server tests/libcustomindicator-tests tests/test-libcustomindicator-dbus +src/custom-service-client.h +src/custom-service-server.h diff --git a/src/Makefile.am b/src/Makefile.am index ff5b26e..aace163 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,6 +82,7 @@ libcustomindicator_la_LIBADD = \ ################################## DBUS_SPECS = \ + custom-service.xml \ notification-item.xml \ notification-watcher.xml diff --git a/src/custom-service.xml b/src/custom-service.xml new file mode 100644 index 0000000..3d943a2 --- /dev/null +++ b/src/custom-service.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3