Commit 7896ef8
committed
fix(grails-gradle): skip missing input dirs in mergeTestReports
The TestReport task registered by TestPhasesGradlePlugin reads test
results from 'test-results/<phase>/binary' directories. When a phase
is skipped (e.g. integrationTest under -PonlyCoreTests) the directory
does not exist and the TestReport task fails with 'Could not write
test report for results in [...]'.
Filter testResults with { File f -> f.exists() } so non-existent
directories are silently dropped. When nothing is produced for a
phase, the merge report is just smaller; when all phases skip, the
merge report is empty but the task still succeeds.
Fixes 14 cascade failures in grails-test-examples-* modules when the
build is invoked with -PonlyCoreTests (the flag used by the CI
'Build Grails-Core' job).1 parent 28dd32f commit 7896ef8
1 file changed
Lines changed: 2 additions & 2 deletions
File tree
- grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
0 commit comments