tests/test-utils: Pass subprocess flags when launching test executable
Will be used to create stdin/stdout pipes. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4210>
This commit is contained in:
parent
3b1067e783
commit
7b0a65d728
@ -292,7 +292,8 @@ verify_screen_cast_content (const char *ref_test_name,
|
||||
test_seq_no_string = g_strdup_printf ("%d", test_seq_no);
|
||||
reftest_flags = META_REFTEST_FLAG_NONE;
|
||||
subprocess =
|
||||
meta_launch_test_executable ("mutter-cursor-tests-screen-cast-client",
|
||||
meta_launch_test_executable (G_SUBPROCESS_FLAGS_NONE,
|
||||
"mutter-cursor-tests-screen-cast-client",
|
||||
ref_test_name,
|
||||
test_seq_no_string,
|
||||
cursor_mode_to_string (cursor_mode),
|
||||
|
@ -920,8 +920,9 @@ meta_flush_input (MetaContext *context)
|
||||
}
|
||||
|
||||
GSubprocess *
|
||||
meta_launch_test_executable (const char *name,
|
||||
const char *argv0,
|
||||
meta_launch_test_executable (GSubprocessFlags subprocess_flags,
|
||||
const char *name,
|
||||
const char *argv0,
|
||||
...)
|
||||
{
|
||||
g_autoptr (GPtrArray) args = NULL;
|
||||
@ -945,7 +946,7 @@ meta_launch_test_executable (const char *name,
|
||||
g_ptr_array_add (args, NULL);
|
||||
va_end (ap);
|
||||
|
||||
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
|
||||
launcher = g_subprocess_launcher_new (subprocess_flags);
|
||||
g_subprocess_launcher_setenv (launcher,
|
||||
"XDG_RUNTIME_DIR", getenv ("XDG_RUNTIME_DIR"),
|
||||
TRUE);
|
||||
|
@ -130,8 +130,9 @@ META_EXPORT
|
||||
void meta_flush_input (MetaContext *context);
|
||||
|
||||
META_EXPORT
|
||||
GSubprocess * meta_launch_test_executable (const char *name,
|
||||
const char *argv0,
|
||||
GSubprocess * meta_launch_test_executable (GSubprocessFlags subprocess_flags,
|
||||
const char *name,
|
||||
const char *argv0,
|
||||
...);
|
||||
|
||||
META_EXPORT
|
||||
|
@ -32,7 +32,8 @@ meta_test_screen_cast_record_virtual (void)
|
||||
g_autoptr (GSubprocess) subprocess = NULL;
|
||||
|
||||
meta_add_verbose_topic (META_DEBUG_SCREEN_CAST);
|
||||
subprocess = meta_launch_test_executable ("mutter-screen-cast-client",
|
||||
subprocess = meta_launch_test_executable (G_SUBPROCESS_FLAGS_NONE,
|
||||
"mutter-screen-cast-client",
|
||||
NULL);
|
||||
meta_wait_test_process (subprocess);
|
||||
meta_remove_verbose_topic (META_DEBUG_SCREEN_CAST);
|
||||
|
Loading…
x
Reference in New Issue
Block a user