protected Object run(String[] args) throws Exception { if (args != null) fArgs = args; fTestableObject = PlatformUI.getTestableObject(); fTestableObject.setTestHarness(this); try { Object application = getApplicationToRun(args); if (application == null) { return Integer.valueOf(200); } runApplication(application, args); } catch (Exception e) { if (fTestRunnerResult == -1) { throw e; } // the exception was thrown after test runner returned. this is most likely a bug in Eclipse Platform // see for example, https://bugs.eclipse.org/bugs/show_bug.cgi?id=436159 // there is no point to fail the build because of this, just log and ignore System.err.println("Caught unexpected exception during test framework shutdown"); e.printStackTrace(); // TODO funnel exceptions to LogService } return Integer.valueOf(fTestRunnerResult); }
this.configurer = aConfigurer; if (PlatformUI.getTestableObject().getTestHarness() != null) { return;