[Jenkinsfile] Mark build as unstable if tests fail on *nix or get interrupted (incl. timeout).
This commit is contained in:
parent
3189c55642
commit
ad3ba4b6e2
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -159,6 +159,16 @@ def doUnitTests(name) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
|
||||
currentBuild.result = 'UNSTABLE'
|
||||
println("${name} unit test interrupted (ran too long?)")
|
||||
} catch (Exception e) {
|
||||
println("${name} unit test failed.")
|
||||
if (isUnix()) {
|
||||
currentBuild.result = 'UNSTABLE'
|
||||
} else {
|
||||
throw e
|
||||
}
|
||||
} finally {
|
||||
// In all cases make sure to at least remove the directory junctions!
|
||||
if (!isUnix()) {
|
||||
|
Loading…
Reference in New Issue
Block a user