tycho/tycho-maven-surefire.patch

87 lines
5.2 KiB
Diff

--- ./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
@@ -5,7 +5,8 @@
Eclipse-AutoStart: true
Bundle-ClassPath: .,
jars/surefire-booter-2.10.jar,
- jars/surefire-api-2.10.jar
+ jars/surefire-api-2.10.jar,
+ 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
@@ -51,6 +51,13 @@
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-booter</artifactId>
<version>${surefire-version}</version>
+
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>maven-surefire-common</artifactId>
+ <version>${surefire-version}</version>
+
</artifactItem>
</artifactItems>
</configuration>