diff --git a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java index 092ee9d7a4..b62ce1c592 100644 --- a/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java +++ b/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/AbstractEclipseTestMojo.java @@ -32,6 +32,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Properties; import java.util.Set; import java.util.StringJoiner; @@ -429,9 +430,9 @@ public abstract class AbstractEclipseTestMojo extends AbstractTestMojo { * when installing products under test (see below). *
default
mode, all necessary files to define the test runtime like
- * config.ini
are generated by tycho. This installation mode has the advantage that the
- * test runtime is minimal (defined by the transitive dependencies of the test bundle plus and
- * the test harness) and existing bundle jars are referenced rather than copied for the
+ * config.ini
are generated by tycho. This installation mode has the advantage that
+ * the test runtime is minimal (defined by the transitive dependencies of the test bundle plus
+ * and the test harness) and existing bundle jars are referenced rather than copied for the
* installationp2Installed
mode, use p2 director to install test bundle, test harness
* bundles and respective dependencies. This installation mode can be used for integration tests
@@ -510,6 +511,22 @@ public abstract class AbstractEclipseTestMojo extends AbstractTestMojo {
@Parameter
private Dependency[] dependencies;
+ /**
+ * Additional root IUs to install, only relevant if {@link #testRuntime} is
+ * p2Installed
.
+ *
+ * + * <install> + * <iu> + * <id>...</id> + * <version>...optional version...</id> + * <feature>true/false</feature> <!-- optional if true .feature.group is automatically added to the id --> + * </install> + *+ */ + @Parameter + private List
org.apache.felix.scr
to make
- * declarative services work), they need to be added manually through an extraRequirements
- * configuration on the target-platform-configuration
plugin.
+ * platform. If there are implicitly required bundles (e.g. org.apache.felix.scr
to
+ * make declarative services work), they need to be added manually through an
+ * extraRequirements
configuration on the target-platform-configuration
+ * plugin.
*
*/
@Mojo(name = "test", defaultPhase = LifecyclePhase.INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
@@ -62,6 +63,9 @@ public class TestPluginMojo extends AbstractEclipseTestMojo {
@Parameter(property = "maven.test.failure.ignore", defaultValue = "false")
private boolean testFailureIgnore;
+ @Parameter
+ private boolean quiet;
+
/**
* Configures the packaging type where this mojos applies, would normally be one of
* eclipse-test-plugin or eclipse-plugin.
@@ -81,15 +85,19 @@ protected File getReportsDirectory() {
@Override
protected void handleSuccess() {
- getLog().info("All tests passed");
+ if (!quiet) {
+ getLog().info("All tests passed");
+ }
}
@Override
protected void handleTestFailures() throws MojoFailureException {
String errorMessage = "There are test failures.\n\nPlease refer to " + reportsDirectory
- + " for the individual test results.";
+ + " for the individual test results.\n\n";
if (testFailureIgnore) {
- getLog().error(errorMessage);
+ if (!quiet) {
+ getLog().error(errorMessage);
+ }
} else {
throw new MojoFailureException(errorMessage);
}