mirror of https://github.com/sbt/sbt.git
Merge pull request #4343 from ignasi35/3150-honour-junit-reports-file-name-conventions
Publish JUnit reports using a compliant filename
This commit is contained in:
commit
cfcb431dae
|
|
@ -226,9 +226,11 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
|
||||||
d.truncatedTo(ChronoUnit.SECONDS).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
d.truncatedTo(ChronoUnit.SECONDS).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||||
|
|
||||||
private def writeSuite() = {
|
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
|
// TODO would be nice to have a logger and log this with level debug
|
||||||
// System.err.println("Writing JUnit XML test report: " + file)
|
// 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)
|
XML.save(file, withTestSuite(_.stop()), "UTF-8", true, null)
|
||||||
testSuite.remove()
|
testSuite.remove()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue