From 17a27c6e9a2cf45b21566b1c87b8ba4c0559ada2 Mon Sep 17 00:00:00 2001 From: renfeiw Date: Fri, 13 Jan 2023 15:38:08 -0500 Subject: [PATCH] Set parent result based on child result - fix the false positive issue caused by TAP parser Fixes #4237 Signed-off-by: renfeiw --- buildenv/jenkins/JenkinsfileBase | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/buildenv/jenkins/JenkinsfileBase b/buildenv/jenkins/JenkinsfileBase index 76fbe926d4..2ab1be2073 100644 --- a/buildenv/jenkins/JenkinsfileBase +++ b/buildenv/jenkins/JenkinsfileBase @@ -1101,7 +1101,6 @@ def run_parallel_tests() { // cleanWs() does not work in some cases, so set opts below cleanWs disableDeferredWipeout: true, deleteDirs: true try { - def buildResult = "" def buildPaths = "" childJobs.each { cjob -> @@ -1120,12 +1119,10 @@ def run_parallel_tests() { } catch (Exception e) { echo 'Exception: ' + e.toString() echo "Cannot copy *.tap or AQACert.log from ${name} with buildid ${buildId} . Skipping copyArtifacts..." - buildResult = childResult } - } - if (buildResult) { - echo "set build status to ${buildResult}" - currentBuild.result = buildResult + if (!currentBuild.resultIsWorseOrEqualTo(childResult)) { + currentBuild.result = childResult; + } } archiveAQAvitFiles() if (buildPaths.length() > 0) {