-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Milestone

Description
Assuming a gradle project where some subprojects
- have the pitest plugin disable; or
- have
failWhenNoMutations
set
We will have some subprojects with to files to aggregate.
When attempting to run pitestReport
on such a project then the following error is shown
Execution failed for task ':pitestReportAggregate'.
> A failure occurred while executing info.solidsoft.gradle.pitest.AggregateReportGenerator
> /... snip .../build/reports/pitest/linecoverage.xml does not exist or is not a file
This is due to the check in ReportAggregator.Builder
when a file is added to aggregation it must exist.
Whilst it is fairly easily to "hack" AggregateReportTask
to strip out subprojects for which pitest is disabled, the failWhenNoMutations
issue is trickier as this needs to be checked at task execution time.
So AggregateReportTask
needs to determine whether reports are missing for a particular subproject and whether that should be an error or not.
Proposal
- remove subprojects for which the pitest task is disabled from aggregation altogether
- when building the report config, if a pitest task has
failWhenNoMutations
, allow the files to be missing and do not add them to be report aggregator.
aSemy, NikolayMetchev, mfvanek and surecloud-jleite