|
Re: Junit not working with latest headless?! [message #549164 is a reply to message #549067] |
Sun, 25 July 2010 15:31 |
|
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 #549222 is a reply to message #549182] |
Mon, 26 July 2010 07:38 |
|
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 15:11 |
Achim Demelt Messages: 160 Registered: July 2009 |
Senior Member |
|
|
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 #549442 is a reply to message #549408] |
Mon, 26 July 2010 15:47 |
|
On 07/26/2010 05:11 PM, Achim Demelt wrote:
> 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.
>
Ouch! That sounds like it deserves a bugzilla. The org.junit4 doesn't contain anything but a reexport so any reference
to it is probably an oversight from the PDE team. And after all, there's no declared dependency left so adding it
"behind the scenes" sounds kind of dirty. Do you have a pointer to that code (or perhaps you'd like to enter the bugzilla)?
In any case, I'll add the org.junit4 bundle back in.
- thomas
|
|
|
Re: Junit not working with latest headless?! [message #549459 is a reply to message #549067] |
Mon, 26 July 2010 17:01 |
Philipp Nanz Messages: 46 Registered: February 2010 |
Member |
|
|
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 17:04] Report message to a moderator
|
|
|
|
Re: Junit not working with latest headless?! [message #549501 is a reply to message #549465] |
Mon, 26 July 2010 21:33 |
|
Sorry, don't understand how I could miss that one. It's back in now.
- thomas
On 07/26/2010 07:29 PM, Philipp Nanz wrote:
> Just checkout with a new Bucky, now I'm getting the same error with
>
> org.eclipse.jdt.junit4.runtime
>
> Thomas, seems you need to add that one too :-/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03132 seconds