tests: port from g_test_trap_subprocess() to g_test_trap_fork()

(or, in a few cases, to g_test_expect_message())

https://bugzilla.gnome.org/show_bug.cgi?id=679683
This commit is contained in:
Dan Winship
2012-11-24 16:34:13 -05:00
committed by Matthias Clasen
parent e3a29184d5
commit ea06ec8063
19 changed files with 1254 additions and 863 deletions

View File

@@ -137,7 +137,7 @@ test_non_socket (void)
pid_t first_child;
GVariant *ret;
const gchar *str;
gboolean ok;
gboolean ok, in_child;
error = NULL;
@@ -219,7 +219,12 @@ test_non_socket (void)
break;
}
if (!g_test_trap_fork (0, 0))
/* This is #ifdef G_OS_UNIX anyway, so just use g_test_trap_fork() */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
in_child = g_test_trap_fork (0, 0);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (!in_child)
{
/* parent */
g_object_unref (streams[0]);