views:

317

answers:

2

Hi !

I am currently trying to use hudson for continuous integration of an eclipse-based desktop application. The tests of this application are implemented with Junit and open some windows when running. I am currently facing some difficulties with launching these tests on a linux slave node because display is not exported.

Could someone help to configure hudson to perform graphical tests on linux slave nodes ?

+1  A: 

Is setting the headless mode practical/of use ?

java -Djava.awt.headless=true

That tells the JVM you don't have a open display.

Brian Agnew
Actually, my problem is to perform "headed" test, not headless.
dilig0
Just edited the above - the property dictates whether you have an open display. Is your problem simply setting the DISPLAY variable for each test then ?
Brian Agnew
A: 

Have a look at vncserver.

Specifically, if your build is using Ant, you could this script to start Ant (and the vncwith) with:

#!/bin/sh
vncserver ${VNCDISPLAY} && export DISPLAY=${VNCDISPLAY} && $ANT_HOME/bin/ant $@;
vncserver -kill ${VNCDISPLAY}

You will need to set a unique environment variable VNCDISPLAY to something like: "localhost:11" for each plan.

npellow