Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365090 - Can't run tests in multi-environment build
Summary: Can't run tests in multi-environment build
Status: CLOSED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 11:23 EST by Igor Fedorenko CLA
Modified: 2021-04-28 16:55 EDT (History)
2 users (show)

See Also:


Attachments
sample project that demostrates the problem (5.68 KB, application/zip)
2011-11-29 11:23 EST, Igor Fedorenko CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2011-11-29 11:23:39 EST
Created attachment 207661 [details]
sample project that demostrates the problem

tycho-surefire-plugin calculates test runtime for all os/ws/arch listed under <environments/> in target-platform-configuration. 

In most cases tests can only run against build system's os/ws/arch. Resolving for other os/ws/arch is inefficient and, more importantly, causes resolution failures for environment specific test-only dependencies listed under tycho-surefire-plugin <dependencies/> configuration parameter. See attached sample project.
Comment 1 Mickael Istria CLA 2012-11-08 12:49:52 EST
Any piece of news or suggested workaround for this issue?
The use case is that we want to put
org.eclipse.jdt.launching.macosx;resolution:=optional
in our test bundles so they would work on macosx.

Some ideas:
* Is it possible to make p2 install UI independently of OS/WS/Arch? It's not a problem if this optional bundle is part of the runtime. The OSGi platform simply won't start it.
* Should resolution occur against the current OS/WS/Arch only?
Comment 2 Tobias Oberlies CLA 2012-11-09 10:09:26 EST
IMHO, bug 356582 would be the solution here: This would require to make the additional assumption that all platforms could be installed at once (if they didn't have the platform filters), but I think that this is true in most real-world examples.

The problem is that bug 356582 probably requires changes in the heart of p2 (the projector), and I'm not sure if this will happen any time soon.
Comment 3 Igor Fedorenko CLA 2012-11-09 10:11:10 EST
why not allow test-specific environment configuration? default to the current platform, but allow override in pom.xml.
Comment 4 Mickael Istria CLA 2012-11-09 10:16:23 EST
Yes, I'll try this workaround (overriding target-platform-configuration in a osx-specific profile).
Comment 5 Mickael Istria CLA 2020-06-29 08:56:00 EDT
Bundles that are platform-specific should override the environments defined in target-platform-configuration to avoid extra work against incompatible environments.