From dce233d4c70e90cfb0f3862ba66538222ffbb7d6 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 28 Jun 2010 18:33:43 -0500 Subject: Starting to link things together... still not working. --- .bzrignore | 1 + tests/Makefile.am | 2 +- tests/test-json-client.c | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.bzrignore b/.bzrignore index e80aadf..ae6fc3d 100644 --- a/.bzrignore +++ b/.bzrignore @@ -187,3 +187,4 @@ tests/libdbusmenu-jsonloader.la tests/libdbusmenu_jsonloader_la-json-loader.lo tests/test-json-server tests/test-json-client +tests/test-json diff --git a/tests/Makefile.am b/tests/Makefile.am index 9dab3eb..3cd4380 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -127,7 +127,7 @@ test_glib_layout_client_LDADD = \ test-json: test-json-client test-json-server Makefile.am @echo "#!/bin/bash" > $@ - @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --task ./test-json-server --task-name Server --ignore-return >> $@ + @echo $(DBUS_RUNNER) --task ./test-json-client --task-name Client --parameter $(top_builddir)/tools/dbusmenu-dumper --parameter output.json --ignore-return --task ./test-json-server --task-name Server --parameter $(srcdir)/test-json-01.json --ignore-return >> $@ @chmod +x $@ test_json_server_SOURCES = \ diff --git a/tests/test-json-client.c b/tests/test-json-client.c index 2d90608..7208fa8 100644 --- a/tests/test-json-client.c +++ b/tests/test-json-client.c @@ -23,7 +23,7 @@ main (int argv, char ** argc) gboolean has_owner = FALSE; gint owner_count = 0; while (!has_owner && owner_count < 10000) { - org_freedesktop_DBus_name_has_owner(bus_proxy, "org.test", &has_owner, NULL); + org_freedesktop_DBus_name_has_owner(bus_proxy, "org.dbusmenu.test", &has_owner, NULL); owner_count++; } @@ -36,8 +36,10 @@ main (int argv, char ** argc) g_debug("Initing"); - mainloop = g_main_loop_new(NULL, FALSE); - g_main_loop_run(mainloop); + gchar * command = g_strdup_printf("%s --dbus-name=org.dbusmenu.test --dbus-object=/org/test > %s", argc[1], argc[2]); + g_debug("Executing: %s", command); + + g_spawn_command_line_sync(command, NULL, NULL, NULL, NULL); g_debug("Exiting"); -- cgit v1.2.3