tests: Mark some tests as skippable
Wayland tests also get kvm and tty test variants, but running tty tests on your main session makes them fail. The intention for tty tests is to skip when not run from a tty, so fix that. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3811>
This commit is contained in:
parent
d9c768da0e
commit
6d8c93ba66
2 changed files with 14 additions and 2 deletions
|
@ -231,6 +231,7 @@ main (int argc,
|
|||
char *argv[])
|
||||
{
|
||||
g_autoptr (MetaContext) context = NULL;
|
||||
MetaTestRunFlags test_run_flags;
|
||||
|
||||
#ifdef MUTTER_PRIVILEGED_TEST
|
||||
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_VKMS,
|
||||
|
@ -250,6 +251,11 @@ main (int argc,
|
|||
g_signal_connect (context, "after-tests",
|
||||
G_CALLBACK (on_after_tests), NULL);
|
||||
|
||||
#ifdef MUTTER_PRIVILEGED_TEST
|
||||
test_run_flags = META_TEST_RUN_FLAG_CAN_SKIP;
|
||||
#else
|
||||
test_run_flags = META_TEST_RUN_FLAG_NONE;
|
||||
#endif
|
||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||
META_TEST_RUN_FLAG_NONE);
|
||||
test_run_flags);
|
||||
}
|
||||
|
|
|
@ -1052,6 +1052,7 @@ main (int argc,
|
|||
char *argv[])
|
||||
{
|
||||
g_autoptr (MetaContext) context = NULL;
|
||||
MetaTestRunFlags test_run_flags;
|
||||
|
||||
#ifdef MUTTER_PRIVILEGED_TEST
|
||||
context = meta_create_test_context (META_CONTEXT_TEST_TYPE_VKMS,
|
||||
|
@ -1071,6 +1072,11 @@ main (int argc,
|
|||
g_signal_connect (context, "after-tests",
|
||||
G_CALLBACK (on_after_tests), NULL);
|
||||
|
||||
#ifdef MUTTER_PRIVILEGED_TEST
|
||||
test_run_flags = META_TEST_RUN_FLAG_CAN_SKIP;
|
||||
#else
|
||||
test_run_flags = META_TEST_RUN_FLAG_NONE;
|
||||
#endif
|
||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||
META_TEST_RUN_FLAG_NONE);
|
||||
test_run_flags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue