[gtk/clipboard-test] Skip clipboard tests when they don't work
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/clipboard-test] Skip clipboard tests when they don't work
- Date: Fri, 30 Apr 2021 13:18:37 +0000 (UTC)
commit 563638444992e97ab0b45e3c8e4ef8d44d25613c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 30 09:17:39 2021 -0400
Skip clipboard tests when they don't work
On headless weston, we have no seat, so focusing
the window won't work, and thus claiming the clipboard
won't either. Skip the tests in that case.
testsuite/gdk/clipboard.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/testsuite/gdk/clipboard.c b/testsuite/gdk/clipboard.c
index f996be054b..37f472ee48 100644
--- a/testsuite/gdk/clipboard.c
+++ b/testsuite/gdk/clipboard.c
@@ -130,6 +130,12 @@ test_clipboard_roundtrip (const char *type,
char *stdout_buf = NULL;
char *stderr_buf = NULL;
+ if (gdk_display_get_default_seat (gdk_display_get_default ()) == NULL)
+ {
+ g_test_skip ("we have no seat, so focus won't work");
+ return;
+ }
+
clipboard_client = g_test_build_filename (G_TEST_BUILT, "/clipboard-client", NULL);
source = g_subprocess_new (G_SUBPROCESS_FLAGS_STDOUT_PIPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]