From: Matthias Clasen Date: Sun, 16 Apr 2023 18:58:26 +0000 (+0200) Subject: testsuite: Skip focus tests when necessary X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~4^2~10^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=91ca51222ae2d5d70d2e68747216ce487eabcf17;p=gtk4.git 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. --- diff --git a/testsuite/gtk/test-focus-chain.c b/testsuite/gtk/test-focus-chain.c index 0ab28caee9..63484ee1a5 100644 --- a/testsuite/gtk/test-focus-chain.c +++ b/testsuite/gtk/test-focus-chain.c @@ -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) {