testsuite: Skip focus tests when necessary

If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
This commit is contained in:
Matthias Clasen 2023-04-16 20:58:26 +02:00
parent db6a116d49
commit 765f55dfbe

View File

@ -214,7 +214,11 @@ load_ui_file (GFile *ui_file,
if (keep_running)
g_source_remove (timeout_handle_id);
g_assert (gtk_window_is_active (GTK_WINDOW (window)));
if (!gtk_window_is_active (GTK_WINDOW (window)))
{
g_print ("Skipping focus tests because window did not get focus. Headless display?");
exit (77);
}
if (ext)
{