glib2/0001-tests-Iterate-mainloop-during-launch-test.patch
DistroBaker afb420636a Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/glib2.git#56c964dd927ec16cf21a972f19a6a9f972f94916
2021-02-09 13:26:50 +00:00

31 lines
1.0 KiB
Diff

From 156ddbc49bc432262fd022efd9831f789fa32e64 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Fri, 23 Oct 2020 18:20:01 +0200
Subject: [PATCH 1/4] tests: Iterate mainloop during launch test
When launching an application, we wait for the DBus response from
systemd before executing the binary. Because of this the main loop needs
to be iterated for spawning to completed and the file to be created.
Without this the test will time out if GLib was able to connect to the
session bus.
---
gio/tests/desktop-app-info.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
index 98601de4f..fb87bf2c2 100644
--- a/gio/tests/desktop-app-info.c
+++ b/gio/tests/desktop-app-info.c
@@ -334,6 +334,7 @@ wait_for_file (const gchar *want_this,
*/
while (access (want_this, F_OK) != 0)
{
+ g_main_context_iteration (NULL, FALSE);
g_usleep (100000); /* 100ms */
g_assert_cmpuint (retries, >, 0);
retries--;
--
2.29.2