mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Convert remaining gio tests to installed
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user