From 227af3c9fcd3b00b8ac2f432591ef908deb8ab1b Mon Sep 17 00:00:00 2001 From: Erki Date: Sun, 23 Jan 2022 19:12:47 +0200 Subject: [PATCH] now with XML --- Jenkinsfile | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9792dc8..4a79b6c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,9 +18,38 @@ pipeline { sh 'conan install .. --build=missing' sh 'cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON' sh 'ninja' - sh 'ctest . --output-on-failure' + sh 'ctest . -T test --output-on-failure --no-compress-output' } } } } + + post { + always { + archiveArtifacts ( + artifacts: 'build/Testing/**/*.xml', + fingerprint: true + ) + + // Process the CTest xml output with the xUnit plugin + xunit ( + testTimeMargin: '3000', + thresholdMode: 1, + thresholds: [ + skipped(failureThreshold: '0'), + failed(failureThreshold: '0') + ], + tools: [CTest( + pattern: 'build/Testing/**/*.xml', + deleteOutputFiles: true, + failIfNotNew: false, + skipNoTestFiles: true, + stopProcessingIfError: true + )] + ) + + // Clear the source and build dirs before next run + deleteDir() + } + } }