mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 15:56:23 +01:00
Merge branch '436-test-coredumps' into 'master'
Fix tests creating coredumps Closes #436 See merge request GNOME/glib!959
This commit is contained in:
commit
17be9e5c4c
@ -2518,6 +2518,14 @@ prepend_terminal_to_vector (int *argc,
|
||||
term_argv = g_new0 (char *, 3);
|
||||
|
||||
check = g_find_program_in_path ("gnome-terminal");
|
||||
if (check != NULL)
|
||||
{
|
||||
term_argv[0] = check;
|
||||
/* Since 2017, gnome-terminal has preferred `--` over `-x` or `-e`. */
|
||||
term_argv[1] = g_strdup ("--");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (check == NULL)
|
||||
check = g_find_program_in_path ("mate-terminal");
|
||||
if (check == NULL)
|
||||
@ -2547,6 +2555,7 @@ prepend_terminal_to_vector (int *argc,
|
||||
term_argv[0] = check;
|
||||
term_argv[1] = g_strdup ("-e");
|
||||
}
|
||||
}
|
||||
|
||||
real_argc = term_argc + *argc;
|
||||
real_argv = g_new (char *, real_argc + 1);
|
||||
|
@ -9,7 +9,7 @@ Comment=GAppInfo example
|
||||
Comment[de]=GAppInfo Beispiel
|
||||
Exec=@installed_tests_dir@/appinfo-test --option %U %i --name %c --filename %k %m %%
|
||||
Icon=testicon.svg
|
||||
Terminal=true
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
StartupWMClass=appinfo-class
|
||||
MimeType=image/png;image/jpeg;
|
||||
|
@ -87,7 +87,7 @@ test_launch_no_app_id (void)
|
||||
"Comment=GAppInfo example\n"
|
||||
"Comment[de]=GAppInfo Beispiel\n"
|
||||
"Icon=testicon.svg\n"
|
||||
"Terminal=true\n"
|
||||
"Terminal=false\n"
|
||||
"StartupNotify=true\n"
|
||||
"StartupWMClass=appinfo-class\n"
|
||||
"MimeType=image/png;image/jpeg;\n"
|
||||
|
@ -3323,6 +3323,18 @@ g_test_trap_fork (guint64 usec_timeout,
|
||||
close (stdout_pipe[1]);
|
||||
if (stderr_pipe[1] >= 3)
|
||||
close (stderr_pipe[1]);
|
||||
|
||||
/* We typically expect these child processes to crash, and some
|
||||
* tests spawn a *lot* of them. Avoid spamming system crash
|
||||
* collection programs such as systemd-coredump and abrt.
|
||||
*/
|
||||
#ifdef HAVE_SYS_RESOURCE_H
|
||||
{
|
||||
struct rlimit limit = { 0, 0 };
|
||||
(void) setrlimit (RLIMIT_CORE, &limit);
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else /* parent */
|
||||
|
Loading…
Reference in New Issue
Block a user