During my last adventures with Jenkins y suffered into a new problem trying to running my gtester’s test battery.
[exec] TEST: tests/stkmngtest... (pid=13754) [exec] [exec] Gtk-WARNING **: cannot open display: [exec] aborting... [exec] FAIL: tests/stkmngtest
that makes my test suite were aborted聽 and also makes Jenkins useless, and useless things are my competitors because the only useless thing allowed at home is me 馃槢 .
The basic problem is that there no are a XOrg session running, first I change runlevel to 5 and expect see test runing聽 a big FAIL was the result.
after reading a bit of literature I discover a thing called Xvfb
for install follow these steps
su
yum install Xvfb
yum install mesa-dri-drivers
the next step was try to install Xvfb plugin in jenkins but i doesn’t work it give these exception
FATAL: null java.lang.NullPointerException at org.jenkinsci.plugins.xvfb.XvfbBuildWrapper.decorateLauncher(XvfbBuildWrapper.java:165) at hudson.model.AbstractBuild$AbstractRunner.createLauncher(AbstractBuild.java:525) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:452) at hudson.model.Run.run(Run.java:1434) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:239)
I found a quick and dirty solution that is put a xvfb-run call in commands that need a xserver like this
<target name=”runtest” description=”run glib test”>
<exec executable=”xvfb-run”>
<arg value=”gtester”/>
<arg value=”tests/stkmngtest”/>
<arg value=”–keep-going”/>
<arg value=”-o=Tests.xml”/>
</exec>
</target>
the solution for solve these problem is configure Jenkins plugin BIG BIG BIG THANKS TO Tomasz Wysocki, he show me the missing configuration options.
Here for global settings
I had the same error but I got it to work.
What I did:
1) Start Xvfb from command line once: Xvfb :2
2) Under Administrate Jenkins -> Configuration, point to the installed Xvfb binary.
2) Then configure it in Jenkins using the same display (:2)
3) Run Jenkins!
4) After the first run, you can configure your job to use any display (blank) and it will work.
Hope that helps!
PS. I am using Debian Squeeze, but that should not be
Thanks, I’ll try your way when i finish to make things work, not perfect, in jenkins.
Also had this problem and solved. My config:
global: http://oi45.tinypic.com/8wl02h.jpg
project: http://oi46.tinypic.com/15r1tas.jpg
Very very big thaks, you save some time for me.
I owe you one 馃槢