Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] please test staged tycho 0.21.0

>I don't understand why this is not automatically loaded since
>the application under test is the Eclipse workbench.  

Tycho uses the transitive dependencies of the test bundle to populate the list of bundles for the test runtime.
If you require anything at test runtime not explicitly required by those bundles, you need to give Tycho a hint.

Typically fragments are not directly required but only end up in the installation included via features being installed, so in this case e.g. adding a dependency on a feature that brings the fragment works around the problem.

Regards,
Jan



-----Original Message-----
From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Lorenzo Bettini
Sent: Sonntag, 27. Juli 2014 13:40
To: tycho-user@xxxxxxxxxxx
Subject: Re: [tycho-user] please test staged tycho 0.21.0

On 23/07/2014 09:03, Sievers, Jan wrote:
>> I had added the dependencies part because
>> org.eclipse.osgi.compatibility.state was not found when I switched to
>> Luna; I thought that in 0.21 that bundle was included in tycho so there
>> would be no need to that dependency part anymore...
> 
> I think you may be mixing up two things here:
> 
> 1. Tycho internally uses an embedded Equinox OSGi runtime; this is basically to be able to use p2 inside a maven build.
>    As an implementation detail, this internal runtime now uses org.eclipse.osgi.compatibility.state
> 
> 2. The OSGi runtime used for executing your tests is something different and entirely defined by you (neglecting the surefire test harness bundles)
> 
> If org.eclipse.osgi.compatibility.state would be always be required for executing tests, that may be a bug (however our ITs and demo projects did not show we need this dependency). I would rather suspect something in your test runtime (transitive dependendencies of your test bundle) requires this bundle.
> 
> Regards,
> Jan

Hi

in my case these are UI tests for an Xtext/Xbase DSL
(http://git.eclipse.org/c/emf-parsley/org.eclipse.emf-parsley.git/tree/dsl/org.eclipse.emf.parsley.dsl.tests/pom.xml?h=tycho),
and apparently org.eclipse.osgi.compatibility.state is required (these
tests are based on a project created in the workbench during the
tests)...  I don't understand why this is not automatically loaded since
the application under test is the Eclipse workbench.  The problem goes
away if I add as extra requirement the org.eclipse.rcp feature - see
below - (which includes org.eclipse.e4.rcp which in turn includes
org.eclipse.osgi.compatibility.state in Luna).  And again this looks
strange to me since org.eclipse.rcp is part of the platform of the
running Eclipse workbench under test, so why do I need to add this
explicitly as an extra requirement?

<plugin>
	<groupId>org.eclipse.tycho</groupId>
	<artifactId>target-platform-configuration</artifactId>
	<configuration>
	<dependency-resolution>
	<extraRequirements>
	<!-- to get the org.eclipse.osgi.compatibility.state plugin iff
	the targeted Eclipse version (e.g., Luna) has it
	(backwards compatible with kepler and previous versions) -->
	<requirement>
		<type>eclipse-feature</type>
		<id>org.eclipse.rcp</id>
		<versionRange>0.0.0</versionRange>
	</requirement>
	</extraRequirements>
	</dependency-resolution>
	</configuration>
</plugin>

cheers
	Lorenzo

> 
> -----Original Message-----
> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Lorenzo Bettini
> Sent: Dienstag, 22. Juli 2014 19:46
> To: tycho-user@xxxxxxxxxxx
> Subject: Re: [tycho-user] please test staged tycho 0.21.0
> 
> Thanks for the clarification Jan,
> 
> using integration-test phase works, but there's one thing which is not
> clear: still referring to
> http://git.eclipse.org/c/emf-parsley/org.eclipse.emf-parsley.git/tree/dsl/org.eclipse.emf.parsley.dsl.tests/pom.xml?h=tycho
> I had added the dependencies part because
> org.eclipse.osgi.compatibility.state was not found when I switched to
> Luna; I thought that in 0.21 that bundle was included in tycho so there
> would be no need to that dependency part anymore... however, if I remove
> 
> <dependencies>
> 	<!-- These are required for Luna
> 		see https://issues.jboss.org/browse/JBIDE-16161 -->
> 	<dependency>
> 		<type>eclipse-plugin</type>
> 		<artifactId>org.eclipse.equinox.event</artifactId>
> 		<version>0.0.0</version>
> 	</dependency>
> 	<dependency>
> 		<type>eclipse-plugin</type>
> 		<artifactId>org.eclipse.osgi.compatibility.state</artifactId>
> 		<version>0.0.0</version>
> 	</dependency>
> </dependencies>
> 
> the UI tests do not work, with this exception
> 
> org.eclipse.core.runtime.CoreException: Plug-in
> org.eclipse.equinox.launcher was unable to load class
> org.eclipse.tycho.surefire.osgibooter.UITestApplication.
> 
> Did I miss something?
> 
> thanks in advance
> 	Lorenzo
> 
> On 22/07/2014 13:42, Sievers, Jan wrote:
>>> am I doing anything wrong?
>>
>> I can reproduce the problem. It seems it's caused by changing the phase of tycho-surefire-plugin from "integration-test" (the default) to the (earlier) phase "test".
>>
>> If you change the phase back consistently to "integration-test", it works for me.
>> Note that you will probably also need to change your surefire dependencies configuration as per [1].
>>
>> I can't tell right now whether this worked by chance before and was never officially supported - Tobias may be able to comment when he is back as I suppose this has to do with commit [2]. I opened [3] now. I don't consider this a stopper for 0.21.0.
>>
>> Anyway at least we need to clarify this in the docs, see bug [4].
>>
>> Regards,
>> Jan
>>
>> [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=436617#c11 
>> [2] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/commit/?id=3da912208f166302bcbf3c6ecac97554f9483536 
>> [3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=440094 
>> [4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=438559 
>>
>>
>>
>> -----Original Message-----
>> From: tycho-user-bounces@xxxxxxxxxxx [mailto:tycho-user-bounces@xxxxxxxxxxx] On Behalf Of Lorenzo Bettini
>> Sent: Freitag, 18. Juli 2014 19:47
>> To: tycho-user@xxxxxxxxxxx
>> Subject: Re: [tycho-user] please test staged tycho 0.21.0
>>
>> On 15/07/2014 09:27, Sievers, Jan wrote:
>>> Tycho milestone release 0.21.0 has been staged. For details of new features and bugfixes, see release notes [1]. 
>>> Please help by testing the staged milestone build. To use it, change your tycho version to 0.21.0 and add snippet [2] to your pom. 
>>>
>>> We plan to promote this release in one week unless major regressions are found.
>>>
>>> Regards,
>>> Tycho team
>>>
>>> [1] http://wiki.eclipse.org/Tycho/Release_Notes/0.21
>>> [2]
>>> <pluginRepositories>
>>>  <pluginRepository>
>>>   <id>tycho-staged</id>
>>>   <url>https://oss.sonatype.org/content/repositories/orgeclipsetycho-1018/</url>
>>>  </pluginRepository>
>>> </pluginRepositories>
>>>
>>
>> In our project, tests are not working after switching to 0.21.0 when we
>> have several executions, e.g.,
>>
>> http://git.eclipse.org/c/emf-parsley/org.eclipse.emf-parsley.git/tree/dsl/org.eclipse.emf.parsley.dsl.tests/pom.xml?h=tycho
>>
>> This was working with 0.20.0 but with this staged version I get
>>
>> [ERROR] Failed to execute goal
>> org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test (default-test) on
>> project org.eclipse.emf.parsley.dsl.tests: Execution default-test of
>> goal org.eclipse.tycho:tycho-surefire-plugin:0.21.0:test failed: Tycho
>> build extension not configured for MavenProject:
>> org.eclipse.emf.parsley:org.eclipse.emf.parsley.dsl.tests:0.1.1-SNAPSHOT
>> @
>> /home/bettini/work/emf/emf-parsley-tycho/dsl/org.eclipse.emf.parsley.dsl.tests/pom.xml
>>
>> am I doing anything wrong?
>>
> 
> 


-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top