From dc1ecaea46f57c85d9426b0564c1775cc647507a Mon Sep 17 00:00:00 2001 From: Roland Thoma Date: Mon, 4 May 2026 12:05:27 +0200 Subject: [PATCH 1/4] Make runner progress output configurable via system property --- .../org/eclipse/rcptt/runner/util/TargetPlatformChecker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java index fcf51ebb4..cc0cb02b0 100644 --- a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java +++ b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java @@ -79,7 +79,9 @@ private void initializeTargetPlatform() throws CoreException { targetPlatform = null; compatibility = null; String location = PDELocationUtils.getProductLocation(conf.location).getAbsolutePath(); - PrintStreamMonitor outMonitor = new PrintStreamMonitor(true); + boolean stdoutDulicate = Boolean.parseBoolean(System.getProperty("rcptt.runner.stdoutDulicate", "true")); + + PrintStreamMonitor outMonitor = new PrintStreamMonitor(stdoutDulicate); if (conf.config != null) { targetPlatform = TargetPlatformManager.createTargetPlatform(location, outMonitor); Map versions = targetPlatform.getVersions(); From d11a41b2f7eabdbacf4a55cbf4d71de60d53c2e8 Mon Sep 17 00:00:00 2001 From: Roland Thoma Date: Mon, 4 May 2026 12:15:02 +0200 Subject: [PATCH 2/4] Fixed setting name --- .../org/eclipse/rcptt/runner/util/TargetPlatformChecker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java index cc0cb02b0..7bca2909c 100644 --- a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java +++ b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java @@ -79,9 +79,9 @@ private void initializeTargetPlatform() throws CoreException { targetPlatform = null; compatibility = null; String location = PDELocationUtils.getProductLocation(conf.location).getAbsolutePath(); - boolean stdoutDulicate = Boolean.parseBoolean(System.getProperty("rcptt.runner.stdoutDulicate", "true")); + boolean progressEnabled = Boolean.parseBoolean(System.getProperty("Drcptt.runner.progress", "true")); - PrintStreamMonitor outMonitor = new PrintStreamMonitor(stdoutDulicate); + PrintStreamMonitor outMonitor = new PrintStreamMonitor(progressEnabled ); if (conf.config != null) { targetPlatform = TargetPlatformManager.createTargetPlatform(location, outMonitor); Map versions = targetPlatform.getVersions(); From 0fd40b67feeceb4a85bed0bad0850f20e1386fc0 Mon Sep 17 00:00:00 2001 From: Roland Thoma Date: Mon, 4 May 2026 12:16:49 +0200 Subject: [PATCH 3/4] Fixed setting name and space --- .../main/java/org/eclipse/rcptt/maven/ExecuteMojo.java | 10 ++++++++++ .../rcptt/runner/util/TargetPlatformChecker.java | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java index d283837ba..1aea52bdb 100644 --- a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java +++ b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java @@ -24,9 +24,11 @@ import java.util.Random; import org.apache.maven.artifact.versioning.ComparableVersion; +import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log; +import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; @@ -83,6 +85,7 @@ public class ExecuteMojo extends AbstractRCPTTMojo { private static final String RUNNER_PLATFORM = "-runnerPlatform"; private static final String TESTENGINE = "-testEngine"; private static final String ENABLE_SOFTWARE_INSTALLATION = "-enableSoftwareInstallation"; + private static final String RUNNER_PROGRESS_PROPERTY = "rcptt.runner.progress"; private static int shutdownListenerPort; private static final String[] DEFAULT_Q7_VM_ARGS = new String[] { "-Xms256m", "-Xmx512m", @@ -91,6 +94,9 @@ public class ExecuteMojo extends AbstractRCPTTMojo { // TODO: Replace this random number with carefully thought one private static final int TEST_FAIL_EXIT_CODE = 56; + @Parameter(defaultValue = "${session}", readonly = true) + private MavenSession session; + private class AUTCommandLine extends Commandline { @Override public void addEnvironment(String name, String value) { if( name.equals("JAVA_TOOL_OPTIONS")) { @@ -122,6 +128,10 @@ public void execute() throws MojoExecutionException, MojoFailureException { // Q7 VM Args List q7VmArgs = new ArrayList(); + String existingProperty = System.getProperty(RUNNER_PROGRESS_PROPERTY); + if (existingProperty == null) { + q7VmArgs.add("-D" + RUNNER_PROGRESS_PROPERTY + "=" + session.getRequest().isDebug()); + } String[] userArgs = getQ7Coords().getVmArgs(); if (userArgs == null || userArgs.length == 0) { q7VmArgs.addAll(asList(DEFAULT_Q7_VM_ARGS)); diff --git a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java index 7bca2909c..e9ce4e4fd 100644 --- a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java +++ b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java @@ -79,9 +79,9 @@ private void initializeTargetPlatform() throws CoreException { targetPlatform = null; compatibility = null; String location = PDELocationUtils.getProductLocation(conf.location).getAbsolutePath(); - boolean progressEnabled = Boolean.parseBoolean(System.getProperty("Drcptt.runner.progress", "true")); + boolean progressEnabled = Boolean.parseBoolean(System.getProperty("rcptt.runner.progress", "true")); - PrintStreamMonitor outMonitor = new PrintStreamMonitor(progressEnabled ); + PrintStreamMonitor outMonitor = new PrintStreamMonitor(progressEnabled); if (conf.config != null) { targetPlatform = TargetPlatformManager.createTargetPlatform(location, outMonitor); Map versions = targetPlatform.getVersions(); From 4f03ad2895ff824e8ca9f9283758c482360a00f6 Mon Sep 17 00:00:00 2001 From: Roland Thoma Date: Tue, 5 May 2026 10:02:51 +0200 Subject: [PATCH 4/4] Align runner progress property with Maven plugin and reviewer feedback --- .../org/eclipse/rcptt/maven/ExecuteMojo.java | 26 ++++++++++++------- .../runner/util/TargetPlatformChecker.java | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java index 1aea52bdb..9794a8698 100644 --- a/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java +++ b/maven-plugin/rcptt-maven-plugin/src/main/java/org/eclipse/rcptt/maven/ExecuteMojo.java @@ -24,11 +24,9 @@ import java.util.Random; import org.apache.maven.artifact.versioning.ComparableVersion; -import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugin.logging.Log; -import org.apache.maven.plugins.annotations.Parameter; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; @@ -85,7 +83,7 @@ public class ExecuteMojo extends AbstractRCPTTMojo { private static final String RUNNER_PLATFORM = "-runnerPlatform"; private static final String TESTENGINE = "-testEngine"; private static final String ENABLE_SOFTWARE_INSTALLATION = "-enableSoftwareInstallation"; - private static final String RUNNER_PROGRESS_PROPERTY = "rcptt.runner.progress"; + private static final String RUNNER_PROGRESS_PROPERTY = "rcptt.runner.target_progress"; private static int shutdownListenerPort; private static final String[] DEFAULT_Q7_VM_ARGS = new String[] { "-Xms256m", "-Xmx512m", @@ -94,9 +92,6 @@ public class ExecuteMojo extends AbstractRCPTTMojo { // TODO: Replace this random number with carefully thought one private static final int TEST_FAIL_EXIT_CODE = 56; - @Parameter(defaultValue = "${session}", readonly = true) - private MavenSession session; - private class AUTCommandLine extends Commandline { @Override public void addEnvironment(String name, String value) { if( name.equals("JAVA_TOOL_OPTIONS")) { @@ -128,11 +123,8 @@ public void execute() throws MojoExecutionException, MojoFailureException { // Q7 VM Args List q7VmArgs = new ArrayList(); - String existingProperty = System.getProperty(RUNNER_PROGRESS_PROPERTY); - if (existingProperty == null) { - q7VmArgs.add("-D" + RUNNER_PROGRESS_PROPERTY + "=" + session.getRequest().isDebug()); - } String[] userArgs = getQ7Coords().getVmArgs(); + if (userArgs == null || userArgs.length == 0) { q7VmArgs.addAll(asList(DEFAULT_Q7_VM_ARGS)); if (java.hasPermGen()) { @@ -142,6 +134,10 @@ public void execute() throws MojoExecutionException, MojoFailureException { q7VmArgs.addAll(asList(userArgs)); } + if (!containsProperty(q7VmArgs, RUNNER_PROGRESS_PROPERTY)) { + q7VmArgs.add("-D" + RUNNER_PROGRESS_PROPERTY + "=" + getLog().isDebugEnabled()); + } + for (String arg : q7VmArgs) { cmd.createArg().setValue(arg); } @@ -338,6 +334,16 @@ public void run() { } }; + private static boolean containsProperty(List args, String property) { + String prefix = "-D" + property + "="; + for (String arg : args) { + if (arg.startsWith(prefix)) { + return true; + } + } + return false; + } + private String getImports() throws MojoFailureException { StringBuilder sb = new StringBuilder(); for (File file : getProjectsDir().listFiles()) { diff --git a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java index e9ce4e4fd..f59e1c173 100644 --- a/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java +++ b/runner/org.eclipse.rcptt.runner/src/org/eclipse/rcptt/runner/util/TargetPlatformChecker.java @@ -79,7 +79,7 @@ private void initializeTargetPlatform() throws CoreException { targetPlatform = null; compatibility = null; String location = PDELocationUtils.getProductLocation(conf.location).getAbsolutePath(); - boolean progressEnabled = Boolean.parseBoolean(System.getProperty("rcptt.runner.progress", "true")); + boolean progressEnabled = Boolean.parseBoolean(System.getProperty("rcptt.runner.target_progress", "true")); PrintStreamMonitor outMonitor = new PrintStreamMonitor(progressEnabled); if (conf.config != null) {