Fix JaCoCo aggregation skipped on test failure
jacocoAggregatedReport was skipped whenever any test failed because
Gradle's hard dependency chain (jacocoAggregatedReport ->
jacocoTestReport -> test) caused it to be blocked by the failed test
task.
Wire test.finalizedBy jacocoTestReport (coverage builds only, via
-PgenerateCoverage) so per-subproject reports are always generated from
.exec files even on partial test failure. Remove dependsOn test to break
the blocking chain. Split the Gradle invocation into two steps in
build-and-test.sh: run tests first, then aggregate; the second step
finds jacocoTestReport UP-TO-DATE and never re-runs tests.
Tested with overriding the Jenkins coverage job:
https://jenkins.kudu.apache.org/job/coverage/61/console
Change-Id: I618069d3d3dc9548d97fcdcc5bed3fca9db67ae6
Reviewed-on: http://gerrit.cloudera.org:8080/24128
Tested-by: Kudu Jenkins
Reviewed-by: Zoltan Chovan <zchovan@cloudera.com>
Reviewed-by: Alexey Serbin <alexey@apache.org>
2 files changed