Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Help With eclipse-test-plugin packaging

By default, Tycho does not run tests from "real" eclipse installation
but instead uses Equinox launcher options to tell it where to look for
test bundle and its dependencies.

From the error log it appears some of your dependencies require fully
provisioned eclipse installation. There is support for running tests
against provisioned eclipse installations [1] but I can't tell off the
top of my head if it'll work for you or not.

[1] https://wiki.eclipse.org/Tycho/Testing_with_Surefire#p2Installed_on_provisioned_RCP_application


--
Regards,
Igor

On 2/5/2014, 10:21, Ryan Baxter wrote:
I am trying to use the eclipse-test-plugin packaging type to run some
unit tests for one of my bundles, but there is an error during the
build that I cannot figure out how to fix.  Hopeing someone can point
me in the right direction.  Here is what I am seeing during my maven
build

[INFO] ------------------------------------------------------------------------

[INFO] Building com.ibm.sbt.opensocial.domino.test 1.0.0-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @
com.ibm.sbt.opensocial.domino.test ---

[INFO] Deleting C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target

[INFO]

[INFO] --- tycho-packaging-plugin:0.19.0:build-qualifier
(default-build-qualifier) @ com.ibm.sbt.opensocial.domino.test ---

[INFO] The project's OSGi version is 1.0.0.201402051448

[INFO]

[INFO] --- tycho-packaging-plugin:0.19.0:validate-id
(default-validate-id) @ com.ibm.sbt.opensocial.domino.test ---

[INFO]

[INFO] --- tycho-packaging-plugin:0.19.0:validate-version
(default-validate-version) @ com.ibm.sbt.opensocial.domino.test ---

[INFO]

[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources)
@ com.ibm.sbt.opensocial.domino.test ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\src\main\resources

[INFO]

[INFO] --- tycho-compiler-plugin:0.19.0:compile (default-compile) @
com.ibm.sbt.opensocial.domino.test ---

[INFO] Compiling 20 source files to C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\classes

[INFO]

[INFO] --- maven-resources-plugin:2.4.3:testResources
(default-testResources) @ com.ibm.sbt.opensocial.domino.test ---

[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!

[INFO] skip non existing resourceDirectory C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\src\test\resources

[INFO]

[INFO] --- tycho-packaging-plugin:0.19.0:package-plugin
(default-package-plugin) @ com.ibm.sbt.opensocial.domino.test ---

[INFO] Building jar: C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\com.ibm.sbt.opensocial.domino.test-1.0.0-SNAPSHOT.jar

[INFO]

[INFO] --- tycho-p2-plugin:0.19.0:p2-metadata-default
(default-p2-metadata-default) @ com.ibm.sbt.opensocial.domino.test ---

[INFO]

[INFO] --- tycho-surefire-plugin:0.19.0:test (default-test) @
com.ibm.sbt.opensocial.domino.test ---

[WARNING] The following locally built units have been used to resolve
project dependencies:

[WARNING]   com.ibm.commons.xml/9.0.0

[WARNING]   com.ibm.commons/9.0.0

[INFO] Expected eclipse log file: C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work\data\.metadata\.log

[INFO] Command line:

cmd.exe /X /C "C:\ibm-java-sdk-60-win-i386\sdk\jre\bin\java.exe
-Dosgi.noShutdown=false -Dosgi.os=win32 -Dosgi.ws=win32
-Dosgi.arch=x86 -Dosgi.clean=true -jar "C:\Users\Ryan J
Baxter\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.3.0.v20120522-1813\org.eclipse.equinox.launcher-1.3.0.v20120522-1813.jar"
-data "C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work\data"
-install "C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work"
-configuration "C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work\configuration"
-application org.eclipse.tycho.surefire.osgibooter.headlesstest
-testproperties "C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\surefire.properties""

An error has occurred. See the log file

C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work\configuration\1391611752290.log.

Here is the beginning of the log file pointed to at the end of the maven build


!SESSION 2014-02-05 09:49:12.019 -----------------------------------------------
eclipse.buildId=unknown
java.fullversion=JRE 1.6.0 IBM J9 2.4 Windows 7 x86-32
jvmwi3260sr14-20130704_155156 (JIT enabled, AOT enabled)
J9VM - 20130704_155156
JIT  - r9_20130517_38390
GC   - GA24_Java6_SR14_20130704_1138_B155156
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -application
org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties
C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\surefire.properties
Command-line arguments:  -data C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\work\data
-application org.eclipse.tycho.surefire.osgibooter.headlesstest
-testproperties C:\Users\Ryan J
Baxter\git\ryan-fork-SocialSDK\domino\com.ibm.sbt.opensocial.domino.test\target\surefire.properties

!ENTRY org.eclipse.update.configurator 4 0 2014-02-05 09:49:13.207
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Exception in
org.eclipse.update.internal.configurator.ConfigurationActivator.start()
of bundle org.eclipse.update.configurator.
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.Exception: Cannot initialize the Update Configurator
at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:97)
at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:70)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
... 12 more
Root exception:
java.lang.Exception: Cannot initialize the Update Configurator
at org.eclipse.update.internal.configurator.ConfigurationActivator.initialize(ConfigurationActivator.java:97)
at org.eclipse.update.internal.configurator.ConfigurationActivator.start(ConfigurationActivator.java:70)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
at java.security.AccessController.doPrivileged(AccessController.java:327)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

After this there are a large number of messages about unresolved
bundles which I depend on.  Why can't these bundles be resolved?  They
are in the manifest and compiling the code does not seem to have a
problem.  I tried specifying some of them in the dependencies in the
tycho-surefire-plugin's configuration section but that did not make a
difference.

Any help is much appreciated.

-Ryan
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top