On Wed, 16 Apr 2025 21:17:16 GMT, Marius Hanl <mh...@openjdk.org> wrote:

>> With this change, you can now run the `swt` tests as easy as: `:swt:test 
>> -PSWT_TEST=true`.
>> ![image](https://github.com/user-attachments/assets/928141b5-ac81-4b15-9d86-5ea87f47c1c4)
>> 
>> Note: At one point `IS_FULL_TEST` was used as well for the enablement of the 
>> tests. I don't see any reason for it, and one flag seems to be enough to me. 
>> But open for opinions on this one.
>
> Marius Hanl has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8169285: SWT tests should run with IS_FULL_TEST

I confirm that this runs fine on my Windows 11 system.

@Maran23 what platforms did you test this on? Windows?

I fired off a CI headful test run, and I see the following failure on Ubuntu 
22.04:


> Task :swt:test FAILED

SWTCursorsTest > testImageCursor() FAILED
    org.opentest4j.AssertionFailedError: expected: not <null>
        at 
app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
        at 
app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
        at 
app//org.junit.jupiter.api.AssertNotNull.failNull(AssertNotNull.java:49)
        at 
app//org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:35)
        at 
app//org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:30)
        at 
app//org.junit.jupiter.api.Assertions.assertNotNull(Assertions.java:304)
        at 
app//test.javafx.embed.swt.SWTCursorsTest.lambda$testImageCursor$0(SWTCursorsTest.java:65)
        at app//org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
        at 
app//org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
        at 
app//org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5039)
        at 
app//org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4519)
        at 
app//test.javafx.embed.swt.SWTCursorsTest.lambda$testImageCursor$1(SWTCursorsTest.java:71)
        at 
app//test.javafx.embed.swt.SWTTest.lambda$runOnSwtThread$0(SWTTest.java:52)
        at app//org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
        at 
app//org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
        at 
app//org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5039)
        at 
app//org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4519)
        at app//test.javafx.embed.swt.SWTTest.runOnSwtThread(SWTTest.java:62)
        at 
app//test.javafx.embed.swt.SWTCursorsTest.testImageCursor(SWTCursorsTest.java:50)

3 tests completed, 1 failed


I recommend two things:

1. File a bug to track the `testImageCursor` test failure on Linux and then 
skip it using an `assumeTrue` (with the new bugID added as a comment).
2. Either remove the `SWT_TEST` flag, since it is always true and doesn't do 
anything useful, or leave it in place, change its default to "false" on macOS 
("true" otherwise), and remove the check for macOS in the `test {}` block. We 
don't need two different ways to skip the tests on macOS.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1783#issuecomment-2828275978

Reply via email to