Document how to run ESCET build on headless Linux
See discussion at https://gitlab.eclipse.org/eclipse/escet/escet/-/issues/1116#note_3984637:
>>>
[...] I've tried to apply it to the ESCET build. However, I can't get it to build and pass the tests [...], as the build hangs when doing `[INFO] --- tycho-surefire:4.0.9:plugin-test (execute-tests) @ org.eclipse.escet.chi.tests.integration ---` ([example](https://github.com/[...]/actions/runs/14785316464/job/41512626496)). This happens both locally on Mac and on GitHub Actions (Unix). I'd like to test out the support before opening a MR, but I'd need some help with the configuration. Is there a profile or a setting I could use, or is perhaps there something I missed in the env setup?
Note: Locally, I tried to simply disable the chi integration tests, but just got stuck in another modules integration tests with the following error:
```[INFO] --- tycho-surefire:4.0.9:plugin-test (execute-tests) @ org.eclipse.escet.common.tests.integration ---
[INFO] Executing test runtime with timeout (seconds): 0, logs, if any, will be placed at: /[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/work/data/.metadata/.log
[INFO] Command line:
[/[...]/.asdf/installs/java/liberica-21.0.1+12/bin/java, -Dosgi.noShutdown=false, -Dosgi.os=macosx, -Dosgi.ws=cocoa, -Dosgi.arch=aarch64, -Dosgi.java.profile=file:/[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/custom.profile, -Dosgi.clean=true, -jar, /[...]/.m2/repository/p2/osgi/bundle/org.eclipse.equinox.launcher/1.6.900.v20240613-2009/org.eclipse.equinox.launcher-1.6.900.v20240613-2009.jar, -data, /[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/work/data, -install, /[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/work, -configuration, /[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/work/configuration, -application, org.eclipse.tycho.surefire.osgibooter.headlesstest, -testproperties, /[...]/Projects/eclipse/escet/common/org.eclipse.escet.common.tests.integration/target/surefire.properties]
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Running org.eclipse.escet.common.tests.integration.CommonTest
***WARNING: Display must be created on main thread due to Cocoa restrictions. Use vmarg -XstartOnFirstThread
Exception in thread "SWTDisplayThread" org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4922)
at org.eclipse.swt.SWT.error(SWT.java:4837)
at org.eclipse.swt.SWT.error(SWT.java:4808)
at org.eclipse.swt.widgets.Display.error(Display.java:1211)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:962)
at org.eclipse.swt.widgets.Display.create(Display.java:946)
at org.eclipse.swt.graphics.Device.<init>(Device.java:132)
at org.eclipse.swt.widgets.Display.<init>(Display.java:800)
at org.eclipse.swt.widgets.Display.<init>(Display.java:791)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1545)
at org.eclipse.escet.common.app.framework.SWTDisplayThread.run(SWTDisplayThread.java:67)```
>>>
>>>
[...]
* I've never tried the build on Mac, so don't know if that works. I know we don't provide command line script for Mac, because of these kind of issues. For Mac, we only supports the ESCET IDE.
* The build works on Linux, as our Jenkins build runs on Linux. It also works on Windows, as I run that regularly on my PC.
* On Linux, you need a working X-window system (see https://gitlab.eclipse.org/eclipse/escet/escet/-/blob/7112de49ddc8cfacc5fe8a5503a488199b4a82e8/Jenkinsfile#L78). In our `Jenkinsfile`, we use the `ubuntu-2404` pod template (see https://gitlab.eclipse.org/eclipse/escet/escet/-/blob/7112de49ddc8cfacc5fe8a5503a488199b4a82e8/Jenkinsfile#L23), as that provides an X-window system, and this ensures that tests that need a UI work properly.
* One way to get a working build, is to run it in an Eclipse development instance. See https://eclipse.dev/escet/development/development/dev-env-setup.html on how to set it up. See https://eclipse.dev/escet/development/development/building-and-testing.html for how to run a build, using the `build` launch configuration.
Let me know whether this helps or not.
>>>
>>>
Yes, thank you, this helps. Btw, I was able to run it successfully by running the following (if you'd like to include it somewhere in the docs for other contributors :smile: ):
```
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
mvn verify
```
>>>
We could include this to help other contributors, and thereby lower the bar for contributions.
issue