Hi,
I am trying to understand how (when an eclipse-test-plugin configured to run UI Tests is invoked) Tycho resolves the target platform plugins to be used in the tests. I am running against Eclipse Luna with Tycho 0.22.
I have a multi-module build, such as:
pom.xml (top level build and parent pom)
- plugins
- - com.cisco.<pluginX>
- - com.cisco.<pluginY>
- - com.cisco.<pluginY>.ui
- - com.cisco.<pluginZ>
- - com.cisco.<pluginZ>.test
- features
- - ...
- site
- - …
When I run the build from the top level, everything compiles just fine, features and update site are built without problem, and most tests run just fine. However, I have one UI test that relies on behavior of Tigerstripe which fails with such an error
that I am lead to believe Tigerstripe is not part of the target platform. Both my source code and test code depends on Tigerstripe, and both compile and build fine. When I run the test as a JUnit Plugin within my workbench the test runs and passes as I expected,
but when invoked by Tycho it fails.
The test plugin has about a dozen dependencies listed in the Manifest as Required Plugins.
I have:
org.eclipse.equinox.ds (read some posts that suggested adding this, so decided to try it)
org.eclipse.equinox.event (for errors being shown in the test workbench .log related to Eclipse 4.4)
org.eclipse.core.runtime
org.eclipse.ui
org.junit
org.eclipse.m2e.archetype.common
org.eclipse.tigerstripe.workbench.base
And finally several com.cisco.<plugin*> references, 2 which come from P2 update sites, and 6 from the build itself.
I added -DdebugPort=5005 and paused the test execution to inspect the com.cisco.<plugin>.test/target folder when the test is invoked. I found a few interesting things, but I am not really sure how to interpret the information.
First off, I found that the target/work/configuration/config.ini file only contains a comment with the build timestamp:
#Fri Apr 10 12:13:19 PDT 2015
Second, I found that the target/work/plugins directory only contains a small subset of the required plugins that were listed in the manifest of the test project:
drwxr-xr-x 8 danijoh2 staff 272 Apr 10 12:13 com.cisco.xmp.<plugin1>_1.2.71.201504101202 (from P2 site)
drwxr-xr-x 9 danijoh2 staff 306 Apr 10 12:13 com.cisco.xmp.<plugin2>_1.2.71.201504101202 (from P2 site)
drwxr-xr-x 10 danijoh2 staff 340 Apr 10 12:13 org.eclipse.jdt.debug_3.8.102.v20150115-1323
drwxr-xr-x 16 danijoh2 staff 544 Apr 10 12:13 org.eclipse.m2e.archetype.common_1.5.1.20150109-1819
drwxr-xr-x 11 danijoh2 staff 374 Apr 10 12:13 org.eclipse.m2e.maven.indexer_1.5.1.20150109-1819
drwxr-xr-x 8 danijoh2 staff 272 Apr 10 12:13 org.eclipse.m2e.maven.runtime.slf4j.simple_1.5.1.20150109-1819
drwxr-xr-x 7 danijoh2 staff 238 Apr 10 12:13 org.eclipse.m2e.maven.runtime_1.5.1.20150109-1819
I was expecting to see the com.cisco.<pluginX/Y/Z>, org.eclipse.tigerstripe.workbench.base, and org.eclipse.equinox.* plugins listed in this directory,
or somehow otherwise referenced by the config.ini, but there is nothing.
My top level POM is configured with tycho-maven-plugin (source/target=1.6), tycho-compiler-plugin, tychco-packaging-plugin (strictVersions=false), tycho-source-plugin (plugin-source goal), and
the target-platform-configuration is:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>0.22.0</version>
<configuration>
<executionEnvironment>JavaSE-1.6</executionEnvironment>
<resolver>p2</resolver>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
</environment>
<environment>
<os>macosx</os>
<ws>cocoa</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
My test project POM is configured with the tycho-surefire-plugin:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<useUIHarness>true</useUIHarness>
<argLine>${junit.args}</argLine>
</configuration>
</plugin>
</plugins>
</build>
Any help offered in getting my tests to run with the correct target platform configuration is greatly appreciated!
Thanks,
Daniel