Skip to content

Commit dedd7ae

Browse files
committed
Disable some clipboard tests when running on wayland with no x11 available
The remote clipboard test requires X11 because Java Swing does not have Wayland backend until Project Wakefield is implemented, therefore these clipboard related tests are skipped. Part of #2714
1 parent aacb15b commit dedd7ae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/RemoteClipboard.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ public void start() throws Exception {
9292
}
9393

9494
private int launchRemote() throws IOException {
95+
if (SwtTestUtil.isLinux) {
96+
String display = System.getenv("DISPLAY");
97+
assumeTrue(display != null && !display.isBlank(), """
98+
The remote clipboard test requires X11 because Java Swing
99+
does not have Wayland backend until Project Wakefield is
100+
implemented, therefore these clipboard related tests are
101+
skipped.
102+
""");
103+
}
104+
95105
/*
96106
* The below copy using getPath may be redundant (i.e. it may be possible to run
97107
* the class files from where they currently reside in the bin folder or the

0 commit comments

Comments
 (0)