[GRADLE-365] Running "gradle test" twice in a row produces a bogus warning: [ant:junitreport] the file TESTS-TestSuites.xml is not a valid testsuite XML document Created: 21/Jan/09 Updated: 04/Jan/13 Resolved: 23/Feb/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 0.6 |
Type: | Bug | ||
Reporter: | Jon Cox | Assignee: | Tom Eyckmans |
Resolution: | Fixed | Votes: | 0 |
Attachments: | GRADLE-365-alternate.patch GRADLE-365-updated-alternative.patch |
Description |
If you have a java project that uses junit and you execute "gradle test" twice in a row TESTS-TestSuites.xml file is not a valide testsuite XML document The first time though, everything runs fine, with no warning. After tracking this down, it seems that the problem is on line 71 of src/main/groovy/org/gradle/api/tasks/testing/AntJunit.groovy In 0.5.2, it says: fileset(dir: testResultsDir.absolutePath, includes: '*.xml') Instead, I think it should probably say: fileset(dir: testResultsDir.absolutePath, includes: '*.xml', excludes: 'TESTS-TestSuites.xml') What I think is happening is that junitreport creates the TESTS-TestSuites.xml file on the I made this change on my own & things seem to work; that said, I'll leave it to someone else to The reason I kept this at 'major' is that I consider build-noise like this very dangerous Incidentally, I checked off "patch submitted" in JIRA, but it's really just the 1-liner above. Thanks again for Gradle! |
Comments |
Comment by Jon Cox [ 25/Jan/09 ] |
Patch for bug: |
Comment by Jon Cox [ 25/Jan/09 ] |
Ok, I felt guilty not submitting an actual patch for trunk, |
Comment by Hans Dockter [ 26/Jan/09 ] |
I also hate build noise. Thanks for the patch. I will assign this to Tom, as he is refactoring the test tasks (e.g. testng support). |
Comment by Steve Appling [ 13/Feb/09 ] |
I happened to also track this down and make a patch before I saw that one had already been submitted. I chose to restrict the includes to the correct files instead of adding an excludes: This seems to correspond to the usage I have seen of junitreport in ant (and in the ant documentation examples). |
Comment by Steve Appling [ 13/Feb/09 ] |
Alternate fix for |
Comment by Jon Cox [ 17/Feb/09 ] |
Steve, I like your patch better. Cheers,
|
Comment by Jon Cox [ 17/Feb/09 ] |
This is an updated version of the patch Steve posted; |
Comment by Tom Eyckmans [ 23/Feb/09 ] |
Hi all, I was annoyed by the warning myself, I've opted for the includes 'TEST-*.xml' as this is the most simple form to get it right . Thx, Tom |