Status: In Progress (View Workflow)
Modern build tools like gradle (https://gradle.org/) are smart enough to only rebuild the parts of the project which have been modified.
When building these projects and only a readme or other none code affecting part has been changed, the build fails with a
ERROR: Test reports were found but none of them are new. Did tests run?
even though the build was OK!
There is a flag allowEmptyResults which overrides when no tests are found. Not finding any new tests should also be categorized as no tests found, but as of today there is no way of overriding this!
This PR changes the behaviour of the allowEmptyResults flag, so that old tests are treated as no found tests, thus allowing to use the flag to to avoid the error...
- is duplicated by
JENKINS-5393 Jenkins falsely fails builds due to aggressive up-to-date check on junit artifacts
- is related to
JENKINS-6268 Make checking for modification time of junit results be configurable and off by default
JENKINS-6268 to this behavior. Addition to not causing an error, many people commenting on the related Jira issues want to have these old results be parsed and actually appear in the report instead of simply ignored or treated as empty results.
Note: I filed this too on GitHub which is related https://github.com/jenkinsci/junit-plugin/issues/201
Since bjorn_frantzen hasn't responded, I opened my own copy of his PR with minor corrections: