tests: Disable debug output from desktop-app-info subprocess

The `apps` subprocess is spawned by desktop-app-info to interpret the
forest of .desktop files, and its output is provided on stdout. If debug
output is mixed up with that output, tests which parse the output fail.

Disable the debug output from the subprocess to prevent this.

The new debug output appeared as a result of recent changes to the
desktop file dir monitoring code in gdesktopappinfo.c.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2018-12-14 13:44:09 +00:00
parent f8421059e9
commit 1947834b70

View File

@ -451,6 +451,8 @@ run_apps (const gchar *command,
else
envp = g_environ_unsetenv (envp, "XDG_CURRENT_DESKTOP");
envp = g_environ_setenv (envp, "G_MESSAGES_DEBUG", "", TRUE);
success = g_spawn_sync (NULL, argv, envp, 0, NULL, NULL, &out, NULL, &status, NULL);
g_assert_true (success);
g_assert_cmpuint (status, ==, 0);