maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [maven-surefire] 01/01: [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
Date Sat, 24 Mar 2018 10:44:46 GMT
This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1479
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit 8e640cdbf68379c64c5adda0da70ceaf19a1af26
Author: Jan Bliznak <jbliznak@redhat.com>
AuthorDate: Fri Mar 16 16:53:42 2018 +0100

    [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
---
 Jenkinsfile                                                         | 6 +++++-
 .../src/main/java/org/apache/maven/surefire/booter/PpidChecker.java | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index c33159c..7f30d30 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -64,7 +64,11 @@ oses.eachWithIndex { os, indexOfOs ->
                         def boolean makeReports = os == 'linux' && indexOfMaven ==
mavens.size() - 1 && jdk == 9
                         def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk
                         def allOptions = options + ["-Dfailsafe-integration-test-port=${failsafeItPort}",
"-Dfailsafe-integration-test-stop-port=${1 + failsafeItPort}"]
-                        buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions,
mavenOpts, makeReports)
+                        try {
+                            buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals,
allOptions, mavenOpts, makeReports)
+                        } catch (e) {
+                            println e
+                        }
                     }
                 }
             }
diff --git a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
index 462eacc..32e3ad7 100644
--- a/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
+++ b/surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java
@@ -36,6 +36,7 @@ import static java.util.concurrent.TimeUnit.MINUTES;
 import static java.util.regex.Pattern.compile;
 import static org.apache.commons.io.IOUtils.closeQuietly;
 import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.SystemUtils.IS_OS_HP_UX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_UNIX;
 import static org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS;
 import static org.apache.maven.surefire.booter.ProcessInfo.ERR_PROCESS_INFO;
@@ -295,6 +296,10 @@ final class PpidChecker
             ProcessInfo processInfo = INVALID_PROCESS_INFO;
             try
             {
+                if ( IS_OS_HP_UX ) // force to run shell commands in UNIX Standard mode on
HP-UX
+                {
+                    processBuilder.environment().put( "UNIX95", "1" );
+                }
                 process = processBuilder.start();
                 destroyableCommands.add( process );
                 Scanner scanner = new Scanner( process.getInputStream(), charset );

-- 
To stop receiving notification emails like this one, please contact
tibordigana@apache.org.

Mime
View raw message