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