Running RCPTT using Maven with Xvfb [message #1807457] |
Thu, 30 May 2019 09:47  |
Eclipse User |
|
|
|
I'm trying to run RCPTT tests in TeamCity with a Linux agent and I'm currently getting an error org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed].
I think this is because Eclipse needs to be run using Xvfb. How do I write my pom.xml in such a way that the application that RCPTT spawns will run using Xvfb, for example xvfb-run /path/to/Eclipse.
My pom.xml looks something like this...
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>shutdown-xvfb-startup</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="Ending (startup) xvfb ..." />
<exec executable="pkill">
<arg value="Xvfb" />
</exec>
</tasks>
</configuration>
</execution>
<execution>
<id>start-xvfb</id>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="Starting xvfb ..." />
<exec executable="Xvfb" spawn="true">
<arg value=":1" />
</exec>
</tasks>
</configuration>
</execution>
<execution>
<id>shutdown-xvfb-shutdown</id>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo message="Ending (shutdown) xvfb ..." />
<exec executable="pkill">
<arg value="Xvfb" />
</exec>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.rcptt</groupId>
<artifactId>rcptt-maven-plugin</artifactId>
<version>${rcptt-maven-version}</version>
<extensions>true</extensions>
<configuration>
<runner>
<version>2.3.0</version>
<vmArgs>
<vmArg>-Xms128m</vmArg>
<vmArg>-Xmx768m</vmArg>
<vmArg>-XX:PermSize=128M</vmArg>
<vmArg>-XX:MaxPermSize=192M</vmArg>
</vmArgs>
</runner>
<aut>
<explicit>eclipse_linux.zip</explicit>
</aut>
<suites>
<suite>TestSuiteSample</suite>
</suites>
</configuration>
</plugin>
</plugins>
|
|
|
|
Powered by
FUDForum. Page generated in 0.27351 seconds