You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2018/03/21 21:44:31 UTC
[maven-surefire] branch SUREFIRE-1479 updated (e3c80cf -> db102a2)
This is an automated email from the ASF dual-hosted git repository.
tibordigana pushed a change to branch SUREFIRE-1479
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git.
discard e3c80cf [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
new db102a2 [SUREFIRE-1479] Force UNIX Standard mode for ps command on HP-UX OS
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (e3c80cf)
\
N -- N -- N refs/heads/SUREFIRE-1479 (db102a2)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Jenkinsfile | 56 ++++++++++++--------------------------------------------
1 file changed, 12 insertions(+), 44 deletions(-)
--
To stop receiving notification emails like this one, please contact
tibordigana@apache.org.
[maven-surefire] 01/01: [SUREFIRE-1479] Force UNIX Standard mode
for ps command on HP-UX OS
Posted by ti...@apache.org.
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 db102a2a7e13931bac9935840d4b622f07a20db2
Author: Jan Bliznak <jb...@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 | 56 +++++-----------------
.../surefire/report/ConsoleOutputFileReporter.java | 4 ++
.../apache/maven/surefire/booter/PpidChecker.java | 5 ++
3 files changed, 21 insertions(+), 44 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index c33159c..fe147ca 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -26,13 +26,12 @@ properties(
]
)
-final def oses = ['linux', 'windows']
-final def mavens = ['3.2.x', '3.3.x', '3.5.x'] // env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.2.x', '3.5.x']
-final def jdks = [7, 8, 9, 10] // env.BRANCH_NAME == 'master' ? [7, 8, 9, 10] : [7, 10]
+final def oses = ['windows']
+final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.5.x']
+final def jdks = env.BRANCH_NAME == 'master' ? [7, 8, 9, 10] : [8]
final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
final def goals = ['clean', 'install', 'jacoco:report']
-final Map stages = [:]
oses.eachWithIndex { os, indexOfOs ->
mavens.eachWithIndex { maven, indexOfMaven ->
@@ -57,14 +56,16 @@ oses.eachWithIndex { os, indexOfOs ->
println "${stageKey} ==> Label: ${label}, JDK: ${jdkTestName}, Maven: ${mvnName}."
- stages[stageKey] = {
- node(label) {
- timestamps {
- //https://github.com/jacoco/jacoco/issues/629
- 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}"]
+ node(label == 'ubuntu' ? 'ubuntu' ? 'Windows-2016-1') {
+ timestamps {
+ //https://github.com/jacoco/jacoco/issues/629
+ 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}"]
+ try {
buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions, mavenOpts, makeReports)
+ } catch (e) {
+ println e
}
}
}
@@ -72,39 +73,6 @@ oses.eachWithIndex { os, indexOfOs ->
}
}
-timeout(time: 10, unit: 'HOURS') {
- try {
- parallel(stages)
- // JENKINS-34376 seems to make it hard to detect the aborted builds
- } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
- // this ambiguous condition means a user probably aborted
- if (e.causes.size() == 0) {
- currentBuild.result = "ABORTED"
- } else {
- currentBuild.result = "FAILURE"
- }
- throw e
- } catch (hudson.AbortException e) {
- // this ambiguous condition means during a shell step, user probably aborted
- if (e.getMessage().contains('script returned exit code 143')) {
- currentBuild.result = "ABORTED"
- } else {
- currentBuild.result = "FAILURE"
- }
- throw e
- } catch (InterruptedException e) {
- currentBuild.result = "ABORTED"
- throw e
- } catch (Throwable e) {
- currentBuild.result = "FAILURE"
- throw e
- } finally {
- stage("notifications") {
- //jenkinsNotify()
- }
- }
-}
-
def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvnName, goals, options, mavenOpts, boolean makeReports) {
cleanWs()
try {
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java
index 84cbabe..f0894ab 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/ConsoleOutputFileReporter.java
@@ -86,6 +86,10 @@ public class ConsoleOutputFileReporter
{
fileOutputStream.close();
}
+ catch ( NullPointerException e )
+ {
+ e.printStackTrace( System.out );
+ }
catch ( IOException ignored )
{
}
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.