Commit 1f573508 authored by Eloy Lafuente's avatar Eloy Lafuente
Browse files

Only analyse rerun junit files with behat tests

parent 5a3c8e64
......@@ -84,10 +84,11 @@ def call( task) {
// Process the jUnit test results.
// By default only process last-rerun junit files. Those are the final, consistent failures.
script {
def jFiles = "${env.BUILD_ID}/*rerun${task.numReruns}.junit/*.xml"
if (task.numReruns == 0) {
// Without reruns, let's process the main junit logs.
jFiles = "${env.BUILD_ID}/*.junit/*.xml"
// By default, process all the junit files.
def jFiles = "${env.BUILD_ID}/*.junit/*.xml"
if (task.task == "behat" && task.numReruns > 0) {
// For behat tasks with reruns, let's process last rerun junit logs only.
jFiles = "${env.BUILD_ID}/*rerun${task.numReruns}.junit/*.xml"
junit allowEmptyResults: true,
testDataPublishers: [[$class: 'ClaimTestDataPublisher']],
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment