Merge pull request #4400 from eed3si9n/bport/junit-reports

[1.2.x] Duplicate reports for backwards-compat adding a name-compliant copy
This commit is contained in:
eugene yokota 2018-10-05 01:18:20 -04:00 committed by GitHub
commit 5649ac0410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -226,9 +226,11 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
d.truncatedTo(ChronoUnit.SECONDS).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
private def writeSuite() = {
val file = new File(targetDir, s"${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
val legacyFile = new File(targetDir, s"${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
val file = new File(targetDir, s"TEST-${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
// TODO would be nice to have a logger and log this with level debug
// System.err.println("Writing JUnit XML test report: " + file)
XML.save(legacyFile, withTestSuite(_.stop()), "UTF-8", true, null)
XML.save(file, withTestSuite(_.stop()), "UTF-8", true, null)
testSuite.remove()
}