I'm trying to get our test reports (generated using google test with the xml output switch) into Jenkins, but keep getting the error message:
Test reports were found but none of them are new. Did leafNodes run?
Jenkins says the test xml files are 15s old, which means these must have been generated on this test run.
We're using a declarative pipeline, and the TEST stage looks like:
stage("TEST") {
steps {
dir("${BUILD_ROOT}") {
sh "make test_report_clean test || true"
junit keepLongStdio: true, testResults: '*_test_gcov.xml'
}
}
}
Here the test_report_clean
make target deletes any existing xml reports, and the test
target is generated from cmake's add_test
function. I have verified that test reports are being generated in the correct location by looking in the Jenkins workspace.
I've also tried the xunit plugin, but the same error message is produced!
(This question was originally posted to Super User but I was asked to move it.)