From 4a94c8c8c2756fb91164b35ecc767a90f1c61a25 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 10:03:10 -0600 Subject: Adding a build for dbus-glib for tests so that we can pass them unmodified. --- tests/Makefile.am | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 15e477e..5040b77 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,13 +24,13 @@ test_libappindicator_SOURCES = \ test-libappindicator.c test_libappindicator_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -DSRCDIR="\"$(srcdir)\"" \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la ######################################### @@ -42,12 +42,12 @@ test_libappindicator_dbus_client_SOURCES = \ test-libappindicator-dbus-client.c test_libappindicator_dbus_client_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_dbus_client_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la ######################################### @@ -59,12 +59,12 @@ test_libappindicator_dbus_server_SOURCES = \ test-libappindicator-dbus-server.c test_libappindicator_dbus_server_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_dbus_server_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la ######################################### @@ -76,12 +76,12 @@ test_libappindicator_status_client_SOURCES = \ test-libappindicator-status-client.c test_libappindicator_status_client_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_status_client_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la ######################################### @@ -93,12 +93,12 @@ test_libappindicator_status_server_SOURCES = \ test-libappindicator-status-server.c test_libappindicator_status_server_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_status_server_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la ######################################### @@ -109,24 +109,24 @@ test_libappindicator_fallback_watcher_SOURCES = \ test-libappindicator-fallback-watcher.c test_libappindicator_fallback_watcher_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_fallback_watcher_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la test_libappindicator_fallback_item_SOURCES = \ test-libappindicator-fallback-item.c test_libappindicator_fallback_item_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_libappindicator_fallback_item_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la test-libappindicator-fallback: test-libappindicator-fallback-watcher test-libappindicator-fallback-item Makefile.am @@ -185,11 +185,11 @@ test_simple_app_SOURCES = \ test-simple-app.c test_simple_app_CFLAGS = \ - $(LIBRARY_CFLAGS) \ + $(TESTDEPS_CFLAGS) $(LIBRARY_CFLAGS) \ -Wall -Werror \ -I$(top_srcdir)/src test_simple_app_LDADD = \ - $(LIBRARY_LIBS) \ + $(TESTDEPS_LIBS) $(LIBRARY_LIBS) \ $(top_builddir)/src/libappindicator.la -- cgit v1.2.3 From 2144d7749d9d1cbe9170502370cf91f09f412fb6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 10:40:23 -0600 Subject: Drop the need and use of dbus-glib --- tests/test-libappindicator-dbus-server.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tests') diff --git a/tests/test-libappindicator-dbus-server.c b/tests/test-libappindicator-dbus-server.c index 995d49b..744ac0e 100644 --- a/tests/test-libappindicator-dbus-server.c +++ b/tests/test-libappindicator-dbus-server.c @@ -21,8 +21,6 @@ with this program. If not, see . */ -#include -#include #include #include #include "test-defines.h" @@ -41,8 +39,6 @@ main (gint argc, gchar * argv[]) { gtk_init(&argc, &argv); - g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); - AppIndicator * ci = app_indicator_new (TEST_ID, TEST_ICON_NAME, TEST_CATEGORY); app_indicator_set_status (ci, TEST_STATE); -- cgit v1.2.3 From a977f312789bec573e7256b50531f44bc8d45a85 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 10:54:16 -0600 Subject: Switching around so that this test passes even if it's not perfect. --- tests/test-libappindicator-dbus-client.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/test-libappindicator-dbus-client.c b/tests/test-libappindicator-dbus-client.c index 1500213..9a51792 100644 --- a/tests/test-libappindicator-dbus-client.c +++ b/tests/test-libappindicator-dbus-client.c @@ -206,8 +206,6 @@ main (gint argc, gchar * argv[]) { g_type_init(); - g_usleep(500000); - GError * error = NULL; DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (error != NULL) { @@ -230,8 +228,10 @@ main (gint argc, gchar * argv[]) dbus_connection_add_filter(dbus_g_connection_get_connection(session_bus), dbus_filter, NULL, NULL); + g_usleep(500000); + DBusGProxy * props = dbus_g_proxy_new_for_name_owner(session_bus, - ":1.0", + ":1.2", "/org/ayatana/NotificationItem/my_id", DBUS_INTERFACE_PROPERTIES, &error); @@ -244,35 +244,35 @@ main (gint argc, gchar * argv[]) "Get", prop_id_cb, NULL, NULL, - G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem", + G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE, G_TYPE_STRING, "Id", G_TYPE_INVALID); dbus_g_proxy_begin_call (props, "Get", prop_category_cb, NULL, NULL, - G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem", + G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE, G_TYPE_STRING, "Category", G_TYPE_INVALID); dbus_g_proxy_begin_call (props, "Get", prop_status_cb, NULL, NULL, - G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem", + G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE, G_TYPE_STRING, "Status", G_TYPE_INVALID); dbus_g_proxy_begin_call (props, "Get", prop_icon_name_cb, NULL, NULL, - G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem", + G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE, G_TYPE_STRING, "IconName", G_TYPE_INVALID); dbus_g_proxy_begin_call (props, "Get", prop_attention_icon_name_cb, NULL, NULL, - G_TYPE_STRING, "org.ayatana.indicator.application.NotificationItem", + G_TYPE_STRING, NOTIFICATION_ITEM_DBUS_IFACE, G_TYPE_STRING, "AttentionIconName", G_TYPE_INVALID); -- cgit v1.2.3