From cae9bc580489e3b09f862401710fac00d20e8393 Mon Sep 17 00:00:00 2001 From: Erik Rehm Date: Wed, 4 Sep 2024 16:42:09 +0200 Subject: [PATCH] Fix calculateErrorTime (#36) --- vars/pipeline2ATX.groovy | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/vars/pipeline2ATX.groovy b/vars/pipeline2ATX.groovy index 7804fe6..c43eab4 100644 --- a/vars/pipeline2ATX.groovy +++ b/vars/pipeline2ATX.groovy @@ -326,21 +326,14 @@ def calculateErrorTime(executionTestSteps) { return } - def stageName = stage.get('name') def stageDuration = stage.get('duration', 0) - - currentPhase = getCurrentPhase(stageName, currentPhase) - - // Only process stages in the execution phase - if (currentPhase == 'execution') { - def teststeps = stage.get('teststeps', []) - def stageErrorTime = findNonPassedVerdict(teststeps, stageDuration) - if (stageErrorTime != null) { - errorTime = accumulatedTime + stageErrorTime - return errorTime - } - accumulatedTime += stageDuration + def teststeps = stage.get('teststeps', []) + def stageErrorTime = findNonPassedVerdict(teststeps, stageDuration) + if (stageErrorTime != null) { + errorTime = accumulatedTime + stageErrorTime + return errorTime } + accumulatedTime += stageDuration } return errorTime }