Merge pull request #5017 from eed3si9n/wip/once

evaluate test result only once
This commit is contained in:
eugene yokota 2019-09-02 01:04:25 -04:00 committed by GitHub
commit 183b45897a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -244,8 +244,9 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
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)
val testSuiteResult = withTestSuite(_.stop())
XML.save(legacyFile, testSuiteResult, "UTF-8", true, null)
XML.save(file, testSuiteResult, "UTF-8", true, null)
testSuite.remove()
}