2012-03-09 21:40:39 +00:00
|
|
|
--- ./tycho-0.14.x.old/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java 2012-02-24 06:40:15.000000000 -0500
|
|
|
|
+++ ./tycho-0.14.x/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java 2012-03-09 15:52:27.000000000 -0500
|
|
|
|
@@ -594,7 +594,7 @@
|
|
|
|
case 0:
|
|
|
|
getLog().info("All tests passed!");
|
|
|
|
break;
|
|
|
|
- case RunResult.NO_TESTS:
|
|
|
|
+ case 254:
|
|
|
|
String message = "No tests found.";
|
|
|
|
if (failIfNoTests) {
|
|
|
|
throw new MojoFailureException(message);
|
|
|
|
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF 2012-02-24 06:40:15.000000000 -0500
|
|
|
|
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF 2012-03-09 14:53:53.000000000 -0500
|
2012-05-29 19:04:45 +00:00
|
|
|
@@ -6,7 +6,8 @@
|
2012-03-09 21:40:39 +00:00
|
|
|
Bundle-ClassPath: .,
|
|
|
|
jars/surefire-booter-2.10.jar,
|
2012-05-29 19:04:45 +00:00
|
|
|
jars/surefire-api-2.10.jar,
|
|
|
|
- jars/plexus-utils-3.0.jar
|
|
|
|
+ jars/plexus-utils-3.0.jar,
|
2012-03-09 21:40:39 +00:00
|
|
|
+ jars/maven-surefire-common-2.10.jar
|
|
|
|
Bundle-Version: 0.14.1
|
|
|
|
Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation)
|
|
|
|
Bundle-ManifestVersion: 2
|
|
|
|
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java 2012-02-24 06:40:15.000000000 -0500
|
|
|
|
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java 2012-03-09 15:44:34.000000000 -0500
|
|
|
|
@@ -26,13 +26,14 @@
|
|
|
|
import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
|
|
|
|
import org.apache.maven.surefire.booter.ProviderConfiguration;
|
|
|
|
import org.apache.maven.surefire.booter.StartupConfiguration;
|
|
|
|
-import org.apache.maven.surefire.booter.StartupReportConfiguration;
|
|
|
|
-import org.apache.maven.surefire.booter.SurefireStarter;
|
|
|
|
+import org.apache.maven.plugin.surefire.StartupReportConfiguration;
|
|
|
|
+import org.apache.maven.plugin.surefire.InPluginVMSurefireStarter;
|
|
|
|
import org.apache.maven.surefire.report.ReporterConfiguration;
|
|
|
|
import org.apache.maven.surefire.suite.RunResult;
|
|
|
|
import org.apache.maven.surefire.testset.DirectoryScannerParameters;
|
|
|
|
import org.apache.maven.surefire.testset.TestRequest;
|
|
|
|
import org.apache.maven.surefire.util.RunOrder;
|
|
|
|
+import org.apache.maven.surefire.testset.RunOrderParameters;
|
|
|
|
import org.eclipse.core.runtime.CoreException;
|
|
|
|
import org.eclipse.core.runtime.IStatus;
|
|
|
|
import org.eclipse.core.runtime.Status;
|
|
|
|
@@ -63,22 +64,22 @@
|
|
|
|
boolean printSummary = true;
|
|
|
|
boolean disableXmlReport = false;
|
|
|
|
ClassLoader testClassLoader = getBundleClassLoader(plugin);
|
|
|
|
- ClassLoader surefireClassLoader = SurefireStarter.class.getClassLoader();
|
|
|
|
+ ClassLoader surefireClassLoader = InPluginVMSurefireStarter.class.getClassLoader();
|
|
|
|
|
|
|
|
TychoClasspathConfiguration classPathConfig = new TychoClasspathConfiguration(testClassLoader,
|
|
|
|
surefireClassLoader);
|
|
|
|
StartupConfiguration startupConfiguration = new StartupConfiguration(provider, classPathConfig,
|
|
|
|
new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkMode, inForkedVM);
|
|
|
|
DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, includes,
|
|
|
|
- excludes, failIfNoTests, RunOrder.FILESYSTEM);
|
|
|
|
+ excludes, null, failIfNoTests, RunOrder.FILESYSTEM.name());
|
|
|
|
ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStacktrace);
|
|
|
|
TestRequest testRequest = new TestRequest(null, testClassesDir, null);
|
|
|
|
- ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, failIfNoTests,
|
|
|
|
+ ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, RunOrderParameters.DEFAULT(), failIfNoTests,
|
|
|
|
reporterConfig, null, testRequest, new Properties(), null);
|
|
|
|
StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
|
|
|
|
StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
|
|
|
|
- trimStacktrace);
|
|
|
|
- SurefireStarter surefireStarter = new SurefireStarter(startupConfiguration, providerConfiguration,
|
|
|
|
+ trimStacktrace, null, "TESTHASH", false);
|
|
|
|
+ InPluginVMSurefireStarter surefireStarter = new InPluginVMSurefireStarter(startupConfiguration, providerConfiguration,
|
|
|
|
startupReportConfig);
|
|
|
|
|
|
|
|
RunResult result = surefireStarter.runSuitesInProcess();
|
|
|
|
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml 2012-02-24 06:40:15.000000000 -0500
|
|
|
|
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml 2012-03-09 14:45:54.987999986 -0500
|
2012-05-29 19:04:45 +00:00
|
|
|
@@ -56,6 +56,13 @@
|
|
|
|
<groupId>org.codehaus.plexus</groupId>
|
|
|
|
<artifactId>plexus-utils</artifactId>
|
|
|
|
<version>${plexusUtilsVersion}</version>
|
2012-03-09 21:40:39 +00:00
|
|
|
+
|
|
|
|
+ </artifactItem>
|
|
|
|
+ <artifactItem>
|
|
|
|
+ <groupId>org.apache.maven.surefire</groupId>
|
|
|
|
+ <artifactId>maven-surefire-common</artifactId>
|
|
|
|
+ <version>${surefire-version}</version>
|
|
|
|
+
|
|
|
|
</artifactItem>
|
|
|
|
</artifactItems>
|
|
|
|
</configuration>
|
2012-05-29 19:04:45 +00:00
|
|
|
--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java 2012-02-24 06:40:15.000000000 -0500
|
|
|
|
+++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java 2012-05-29 16:45:39.000000000 -0400
|
|
|
|
@@ -30,6 +30,11 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
+ public ClassLoader createInprocSurefireClassLoader(ClassLoader parent) throws SurefireExecutionException {
|
|
|
|
+ return surefireClassLoader;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
public ClassLoader createTestClassLoader() throws SurefireExecutionException {
|
|
|
|
return testClassLoader;
|
|
|
|
}
|