powered by Jive Software

Build failure (org.jivesoftware.util.GraphicsUtilsTest)

Hello!
I’m maintainer of openfire port in FreeBSD. And I have the next problem during auto build process.

[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.189 s <<< FAILURE! - in org.jivesoftware.util.GraphicsUtilsTest
[ERROR] testIsImageWithFavicon(org.jivesoftware.util.GraphicsUtilsTest)  Time elapsed: 0.173 s  <<< ERROR!
java.awt.AWTError: Can't connect to X11 window server using 'unix:0.0' as the value of the DISPLAY variable.
        at org.jivesoftware.util.GraphicsUtilsTest.testIsImageWithFavicon(GraphicsUtilsTest.java:58)

Its happens only when I start build process by command without login to jail. I.e when I’m login to jail and run:

make -C /path/to/dir/openfire-test;

Its successfully compiling and pass tests. But when I try to run:

cbsd jexec jname=openfire64 "make -C /path/to/dir/openfire-test";

I get the failure in test.
How can I to patch sources to disable this test?

The problem is caused by the test apparently depending on some kind of graphical library that’s not available in your build environment, potentially because you’re running headless.

You could run the build in an environment that has these facilities, or you can skip the tests while you build the packages (with something like mvn -DskipTests=true). You could make things a bit more elaborate and skip only the test that requires to be executed in a a non-headless environment.

Thank you. -DskipTests=true work and now it’s enough.