Junit not working with latest headless?! [message #549067] |
Fri, 23 July 2010 19:48  |
Eclipse User |
|
|
|
I have let my buckminster reinstall the buckminster-3.6 headless using automatic install.
Now I'm getting:
Quote: | INFO: junit '-l' 'net.sf.logsaw.tests/junit.launch' '-o' '/D:/hudson/jobs/LogSaw_Build/workspace//buckminster.output/ junit-results.xml'
Required plug-in 'org.junit4' could not be found.
|
during build.
I have checked the plugin dirs and indeed the old bucky had a org.junit4 bundle while the new one does not.
Maybe some dependency was missed when removing the org.junit4 bundle?
|
|
|
|
|
|
Re: Junit not working with latest headless?! [message #549222 is a reply to message #549182] |
Mon, 26 July 2010 03:38   |
Eclipse User |
|
|
|
Hi Philipp,
I run junit tests successfully with the current buckminster headless so I know for sure there isn't any bundle missing
in order to do that. Do you use a fresh install or do you have some older bundles lingering?
The versions in the junit bundle indicates the minimum version that this bundle can use in order to run. The versions
that are then used are the ones listed in the o.e.buckminster.core.headless feature. There should be no dangling
reference in any of the Buckminster bundles or features.
- thomas
On 07/26/2010 12:34 AM, Philipp Nanz wrote:
> Assuming that the org.eclipse.buckminster.junit plugin is the main entry
> point for the Junit command, I've digged into its MANIFEST.MF
>
> Taken from org.eclipse.buckminster.junit_1.0.0.r11240.jar
>
> Require-Bundle: org.eclipse.buckminster.cmdline;bundle-version="1.0.35
> 0",org.eclipse.buckminster.core;bundle-version="1.1.350",org.eclipse.
> buckminster.runtime;bundle-version="1.1.0",org.eclipse.jdt.junit.core
> ;bundle-version="3.6.0",org.eclipse.debug.core;bundle-version= "3.5.0"
> ,org.eclipse.core.runtime;bundle-version="3.5.0"
>
>
>
> I find that require bundle stuff rather fishy, seems to be a mixture of
> 3.5 and 3.6 which could explain the dangling org.junit4 dependency.
>
|
|
|
|
Re: Junit not working with latest headless?! [message #549408 is a reply to message #549164] |
Mon, 26 July 2010 11:11   |
Eclipse User |
|
|
|
Philipp,
Do you have an explicit target platform? And does that TP include the
org.junit4 bundle? If not, please try adding that to your TP.
Thomas,
It seems the PDE JUnit launcher explicitly tries to add the org.junit4
bundle to the Equinox runtime when running JUnit4 tests. If your original
bundles are coded against org.junit [4.x, 5), and your TP thus does not
contain org.junit4, the build will fail. We may want to add that bundle to
our feature again.
Cheers,
Achim
Thomas Hallgren wrote:
> Hi Philipp,
>
> AFAIK, the org.junit4 bundle is just an empty bundle that reexports the
> org.junit 4.8.1. Try changing your launch configuration to appoint
> org.junit instead and see if that helps.
>
> Regards,
> Thomas Hallgren
>
>
> On 07/24/2010 01:48 AM, Philipp Nanz wrote:
>> I have let my buckminster reinstall the buckminster-3.6 headless using
>> automatic install.
>>
>> Now I'm getting:
>> Quote:
>>> INFO: junit '-l' 'net.sf.logsaw.tests/junit.launch' '-o'
>>> '/D:/hudson/jobs/LogSaw_Build/workspace//buckminster.output/
>>> junit-results.xml'
>>> Required plug-in 'org.junit4' could not be found.
>>
>> during build.
>>
>> I have checked the plugin dirs and indeed the old bucky had a org.junit4
>> bundle while the new one does not.
>>
>> Maybe some dependency was missed when removing the org.junit4 bundle?
|
|
|
|
Re: Junit not working with latest headless?! [message #549459 is a reply to message #549067] |
Mon, 26 July 2010 13:01   |
Eclipse User |
|
|
|
Ah, it begins to make sense now 
@Achim: Yes, a target platform exists that is being generated by materializing various features. It's a bit messy to change that, so I would like to avoid that unless you would really like me to test that for some reason.
So I will just wait for the bucky that contains org.junit4 again and/or for the PDE fix
Btw: The culprit seems to be org.eclipse.pde.launching.JUnitLaunchConfigurationDelegate
line 431 contains a reference to org.junit4
private String[] getRequiredPlugins(ILaunchConfiguration configuration) {
// if we are using JUnit4, we need to include the junit4 specific bundles
ITestKind testKind = JUnitLaunchConfigurationConstants.getTestRunnerKind(configuration);
if (TestKindRegistry.JUNIT4_TEST_KIND_ID.equals(testKind.getId()))
return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime", "org.junit4", "org.eclipse.jdt.junit4.runtime"}; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
return new String[] {"org.junit", "org.eclipse.jdt.junit.runtime", "org.eclipse.pde.junit.runtime"}; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
}
Note: Thats taken from org.eclipse.pde.launching_3.6.0.v20100601 (Helios final Eclipse IDE distro)
[Updated on: Mon, 26 July 2010 13:04] by Moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04397 seconds