Convert remaining gio tests to installed

This commit is contained in:
Matthias Clasen
2013-05-20 08:46:21 -04:00
parent 5e1f9173c3
commit 142d78214d
9 changed files with 194 additions and 43 deletions

View File

@@ -26,6 +26,8 @@
#include "gdbus-tests.h"
static const gchar *datapath;
/* all tests rely on a shared mainloop */
static GMainLoop *loop = NULL;
@@ -60,6 +62,7 @@ test_proxy_well_known_name (void)
gchar **property_names;
GVariant *variant;
GVariant *result;
gchar *path;
session_bus_up ();
@@ -98,7 +101,9 @@ test_proxy_well_known_name (void)
g_assert (g_dbus_proxy_get_cached_property_names (ap) == NULL);
/* this is safe; testserver will exit once the bus goes away */
g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
path = g_build_filename (datapath, "gdbus-testserver", NULL);
g_assert (g_spawn_command_line_async (path, NULL));
g_free (path);
/* check that we get the notify::g-name-owner signal */
_g_assert_property_notify (p, "g-name-owner");
@@ -224,7 +229,10 @@ test_proxy_well_known_name (void)
* the 'y' property should be back at 1...
*/
/* this is safe; testserver will exit once the bus goes away */
g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
path = g_build_filename (datapath, "gdbus-testserver", NULL);
g_assert (g_spawn_command_line_async (path, NULL));
g_free (path);
/* check that we get the notify::g-name-owner signal */
_g_assert_property_notify (p, "g-name-owner");
/* Now we should have a name owner as well as properties */
@@ -259,6 +267,11 @@ main (int argc,
{
gint ret;
if (g_getenv ("G_TEST_DATA"))
datapath = g_getenv ("G_TEST_DATA");
else
datapath = SRCDIR;
g_test_init (&argc, &argv, NULL);
/* all the tests rely on a shared main loop */