Skip to content

Commit

Permalink
Fix calculateErrorTime (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikRehmTT committed Oct 10, 2024
1 parent e2c7ec2 commit cae9bc5
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions vars/pipeline2ATX.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cae9bc5

Please sign in to comment.