Hi everybody,

I have a complex problem to solve and unfortunately I am out of ideas.
Hopefully you can help me.

My situation is like this:
I am using Eclipse 3.8 to run a headless Eclipse application (PDE 
EclipseTestRunner).
In addition the jacoco javaagent is started via -javaagent parameter to gather 
code coverage.

The Jacoco javaagent is implemented via a singleton pattern.

I have written a special class that is invoked automatically by the headless 
application (during the tests). This special class is a JUnitFormatter that is 
used for tweaking the code coverage data for a testcase (storing for each test 
case a dedicated session within the coverage data). For that the access to the 
Jacoco instance is necessary. The formatter class is contained in a bundle 
fragment (of org.eclipse.test) that has a dependency to ant and junit4.

The formatter class itself can be invoked (when specifying the host as 
org.eclipse.test) but then I get an exception that the Jacoco agent 
class(instance) cannot be found at all.

To solve this problem I played around (according to 
http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi/) 
with system packages, extension bundles, boot delegation but none of it worked. 
Either the agent class could not be found or even the JunitFormatter class 
could not be found (I guess that in this case the fragment could not be loaded 
due to certain dependencies).

Any idea how to solve that? Do I maybe need to change the parent classloader 
when running the tests?


Thank you a lot in advance.

Marko

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to