Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 367118 - Tests running via tycho, can't access simpleconfigurator bundles.info this breaks some standard Eclipse functionality
Summary: Tests running via tycho, can't access simpleconfigurator bundles.info this br...
Status: CLOSED DUPLICATE of bug 343152
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Tycho (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-19 13:43 EST by Kris De Volder CLA
Modified: 2021-04-28 16:55 EDT (History)
3 users (show)

See Also:


Attachments
Zipped up copy of a JUnit plugin test that passes when running in Eclipse, failing when running in tycho (3.78 KB, application/zip)
2011-12-19 13:46 EST, Kris De Volder CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kris De Volder CLA 2011-12-19 13:43:45 EST
Build Identifier: 

Some eclipse functionality depends on the simpleconfigurator to discover information about the host platform. Any such functionality breaks when running JUnit plugin tests with tycho.

For example, I have some JUnit plugin tests that 
  - create a test projects in the runtime workspace
  - add a JUnit libraries classpath container to the test project
  
These test project don't work/compile correctly in the runtime workspace when running inside tycho because the JUnit libraries classpath container doesn't correctly resolve. Thus the projects will be missing JUnit libraries and fail to compile.

With some digging I discovered that the reason why Junit classpath container is not resolving correctly is because the org.eclipse.junit.core plugin relies on 
bundles.info file to discover the installed junit bundles and find the junit jar files in them. 

It does this by calling on functionality from org.eclipse.equinox.simpleconfigurator.manipulator.SimpleConfiguratorManipulator

Relevant code lives in org.eclipse.jdt.internal.junit.buildpath.P2Utils
in the ..eclipse.jdt.junit.core bundle. (E.g. see the 'findBundle' method).

Reproducible: Always

Steps to Reproduce:
1. Import attached plugin project as an 'existing project' into Eclipse RCP
2. Run as Junit plugin test => test passes
3. Create a tycho build that runs the same test suite.
4. The test will fail.
Comment 1 Kris De Volder CLA 2011-12-19 13:46:36 EST
Created attachment 208576 [details]
Zipped up copy of a JUnit plugin test that passes when running in Eclipse, failing when running in tycho
Comment 2 Igor Fedorenko CLA 2011-12-19 14:24:26 EST
We welcome quality patches. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=343152#c3 for more specific requirements.

*** This bug has been marked as a duplicate of bug 343152 ***