Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Show failed tests on Jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
LipuFei committed Mar 27, 2019
1 parent c7190f7 commit b1f15c0
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,27 @@ parallel_nodes(["linux && cura", "windows && cura"]) {
}
// Try and run the unit tests. If this stage fails, we consider the build to be "unstable".
stage('Unit Test') {
try {
make('test')
} catch(e) {
currentBuild.result = "UNSTABLE"
if (isUnix())
{
// For Linux
try {
sh 'make CTEST_OUTPUT_ON_FAILURE=TRUE test'
} catch(e)
{
currentBuild.result = "UNSTABLE"
}
}
else
{
// For Windows
try
{
// This also does code style checks.
bat 'ctest -V'
} catch(e)
{
currentBuild.result = "UNSTABLE"
}
}
}
}
Expand Down

0 comments on commit b1f15c0

Please sign in to comment.