From bc29c3e31adbed4dd2b93c1a461da9936b54456c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 9 Dec 2009 14:00:40 -0600 Subject: Adding in support for bustling the 'test-glib-layout' test results. --- tests/test-glib-layout-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test-glib-layout-client.c') diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index a7dd683..6a79321 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -111,7 +111,7 @@ main (int argc, char ** argv) g_usleep(500000); - DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); + DbusmenuClient * client = dbusmenu_client_new(":1.1", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); g_timeout_add_seconds(10, timer_func, client); -- cgit v1.2.3 From 0c85926daf6361821a4a6023e8756d1634fbfd85 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 22 Dec 2009 20:51:37 -0600 Subject: Removing the bustle captures as we're not using them and they seem to be breaking on Hudson. --- tests/Makefile.am | 19 +++++++------------ tests/test-glib-layout-client.c | 2 +- tests/test-glib-objects.c | 3 ++- tests/test-glib-properties-client.c | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) (limited to 'tests/test-glib-layout-client.c') diff --git a/tests/Makefile.am b/tests/Makefile.am index fa18b9d..aaa958a 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -44,7 +44,7 @@ glib_server_nomenu_LDADD = \ test-glib-layout: test-glib-layout-client test-glib-layout-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-glib-layout-client --task-name Client --task ./test-glib-layout-server --task-name Server --ignore-return >> $@ @chmod +x $@ test_glib_layout_server_SOURCES = \ @@ -80,7 +80,7 @@ OBJECT_XML_REPORT = test-glib-objects.xml test-glib-objects-test: test-glib-objects Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) -b $@.bustle --task gtester --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ + @echo $(DBUS_RUNNER) --task gtester --parameter --verbose --parameter -k --parameter -o --parameter $(OBJECT_XML_REPORT) --parameter ./test-glib-objects >> $@ @chmod +x $@ test_glib_objects_SOURCES = \ @@ -100,7 +100,7 @@ test_glib_objects_LDADD = \ test-glib-properties: test-glib-properties-client test-glib-properties-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-glib-properties-client --task-name Client --task ./test-glib-properties-server --task-name Server --ignore-return >> $@ @chmod +x $@ test_glib_properties_server_SOURCES = \ @@ -149,7 +149,7 @@ test_glib_simple_items_LDADD = \ test-gtk-label: test-gtk-label-client test-gtk-label-server test-gtk-label.json Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-label-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ test_gtk_label_server_SOURCES = \ @@ -189,7 +189,7 @@ test_gtk_label_client_LDADD = \ test-gtk-reorder: test-gtk-label-client test-gtk-reorder-server Makefile.am @echo "#!/bin/bash" > $@ @echo $(XVFB_RUN) >> $@ - @echo $(DBUS_RUNNER) -b $@.bustle --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-gtk-label-client --task-name Client --task ./test-gtk-reorder-server --parameter $(srcdir)/test-gtk-label.json --task-name Server --ignore-return >> $@ @chmod +x $@ test_gtk_reorder_server_SOURCES = \ @@ -263,10 +263,5 @@ distclean-local: DISTCLEANFILES = \ $(TESTS) \ - $(OBJECT_XML_FILE) \ - test-glib-objects-test.bustle \ - test-glib-layout.bustle \ - test-glib-properties.bustle \ - test-glib-simple-items.bustle \ - test-gtk-label.bustle \ - test-gtk-reorder.bustle + $(OBJECT_XML_FILE) + diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index 6a79321..a7dd683 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -111,7 +111,7 @@ main (int argc, char ** argv) g_usleep(500000); - DbusmenuClient * client = dbusmenu_client_new(":1.1", "/org/test"); + DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); g_timeout_add_seconds(10, timer_func, client); diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 7b22b7a..f3fbcc8 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -155,9 +155,10 @@ test_object_menuitem_props_swap (void) static void test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GValue * value, GValue ** out) { - /* g_debug("Signal handler got: %s", property); */ if (!g_strcmp0(property, "swapper")) { *out = value; + } else { + g_warning("Signal handler got: %s", property); } return; } diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index 9e257ea..39815aa 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -155,7 +155,7 @@ main (int argc, char ** argv) /* Make sure the server starts up and all that */ g_usleep(500000); - DbusmenuClient * client = dbusmenu_client_new(":1.1", "/org/test"); + DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); death_timer = g_timeout_add_seconds(10, timer_func, client); -- cgit v1.2.3 From 5c4c4143a5ea25ec408304fdc7463709163ff9a7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 7 Jan 2010 08:55:35 -0600 Subject: Removing the half second timeout as it's no longer needed. --- tests/test-glib-layout-client.c | 4 +--- tests/test-glib-layout-server.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'tests/test-glib-layout-client.c') diff --git a/tests/test-glib-layout-client.c b/tests/test-glib-layout-client.c index a7dd683..bb2d13a 100644 --- a/tests/test-glib-layout-client.c +++ b/tests/test-glib-layout-client.c @@ -109,9 +109,7 @@ main (int argc, char ** argv) { g_type_init(); - g_usleep(500000); - - DbusmenuClient * client = dbusmenu_client_new(":1.0", "/org/test"); + DbusmenuClient * client = dbusmenu_client_new("org.dbusmenu.test", "/org/test"); g_signal_connect(G_OBJECT(client), DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED, G_CALLBACK(layout_updated), NULL); g_timeout_add_seconds(10, timer_func, client); diff --git a/tests/test-glib-layout-server.c b/tests/test-glib-layout-server.c index cc9b8e7..40dd048 100644 --- a/tests/test-glib-layout-server.c +++ b/tests/test-glib-layout-server.c @@ -24,6 +24,7 @@ with this program. If not, see . #include #include #include +#include #include #include @@ -74,10 +75,26 @@ timer_func (gpointer data) int main (int argc, char ** argv) { + GError * error = NULL; + g_type_init(); + DBusGConnection * connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL)))); + DBusGProxy * bus_proxy = dbus_g_proxy_new_for_name(connection, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS); + guint nameret = 0; + + if (!org_freedesktop_DBus_request_name(bus_proxy, "org.dbusmenu.test", 0, &nameret, &error)) { + g_error("Unable to call to request name"); + return 1; + } + + if (nameret != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER) { + g_error("Unable to get name"); + return 1; + } + server = dbusmenu_server_new("/org/test"); timer_func(NULL); -- cgit v1.2.3