I’m currently trying to move GMF-Runtime build to Tycho (following GMF-Tooling). I asked for a job on the hudson.eclipse.org server for this new fast and simple build but I encountered an issue. And I found a solution.
The issue
GMF is a graphical framework, so there are User Interface tests. Unfortunately, they failed with the following error - which you can find in .log of the workspace/.metadata folder - when you run any test on the eclipse server:
[cc]
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4308)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:909)
at org.eclipse.swt.widgets.Display.create(Display.java:897)
at org.eclipse.swt.graphics.Device.(Device.java:157)
at org.eclipse.swt.widgets.Display.(Display.java:500)
at org.eclipse.swt.widgets.Display.(Display.java:491)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:711)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.runApplication(UITestApplication.java:31)
at org.eclipse.tycho.surefire.osgibooter.AbstractUITestApplication.run(AbstractUITestApplication.java:114)
at org.eclipse.tycho.surefire.osgibooter.UITestApplication.start(UITestApplication.java:37)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
[/cc]
The solution
I spent some time on Google and found the solution... in several chunks. So I put them together to provide the solution here in a single piece:
Check Run Xvnc during build (and don’t bother to check take screenshot, it doesn’t work)
- Add an Execute shell build action before launching your tests with metacity --replace --sm-disable & :
Simple but it’s all in one place. Hope it will help you.
And - talking about help - any help on understanding why these three GMF tests are still failing is very welcome.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.