Community
Participate
Working Groups
When the test runtime doesn't start up normally, e.g. when an exception is thrown in OsgiSurefireBooter.getBundleClassLoader(String) the message "All tests passed!" is printed an the build succeeds. The build should fail. There are different ways to reproduce this: * Throw a RuntimeException in the start method of the BundleActivator of the test bundle * Add a platform filter which doesn't match your OS to the test bundle manifest, e.g. Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
may be the same issue as bug 410685 and/or bug 424255
I agree with Jan, bugs 410685 and 424255 seems to some instances of this bug. The issue is probably that AbstractUITestApplication.runTests methods only does a printStackTrace when catching an exception from the OSGiSurefireBooter. http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/AbstractUITestApplication.java#n36 Instead, the failure should be stored and checked in order to compute the application return code (that shouldn't be 0 when an exception was caught).
*** Bug 424255 has been marked as a duplicate of this bug. ***
Created attachment 242977 [details] Tentative IT test (In reply to Tobias Oberlies from comment #0) > There are different ways to reproduce this: > * Throw a RuntimeException in the start method of the BundleActivator of the > test bundle I just tried to write an integration-test that does what's described here, but the behaviour seems correct with 0.21.0-SNAPSHOT: surefire fails and report error 13 while Eclipse log contains the root cause.
> There are different ways to reproduce this: > * Throw a RuntimeException in the start method of the BundleActivator of the > test bundle > * Add a platform filter which doesn't match your OS to the test bundle > manifest, e.g. Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) > (osgi.arch=x86)) Using the attached sample, both of these fail the build as expected. I also tried throwing a hardcoded a RuntimeException in OsgiSurefireBooter.getBundleClassLoader(String) and the build fails as expected. Behaviour is consistent and works as expected with tycho 0.19.0, 0.20.0 and 0.21.0-SNAPSHOT. This bug needs a project to reproduce. If you re-open, make sure to attach a sample project demonstrating the issue.
Sorry, I forgot to mention in my description that I was using a Luna M6 target platform. So the observed problem was in fact Equinox bug 436073. *** This bug has been marked as a duplicate of bug 436073 ***