Fix error reporting in TeamCity: don't create a TestCase for each test in case of compiler failure

This commit is contained in:
Pavel Punegov
2018-08-29 19:10:53 +03:00
committed by Pavel Punegov
parent 1782b4b973
commit 7d8a4e2bf1
@@ -931,10 +931,10 @@ fun runTest() {
runCompiler(compileList, buildExePath(), flags)
} catch (Exception ex) {
println("ERROR: Compilation failed for test suite: ${testSuite.name} with exception: ${ex}")
ktFiles.each {
def testCase = testSuite.createTestCase(it.name)
testCase.error(ex)
}
println("The following files were unable to compile:")
ktFiles.each { println it.name }
statistics.error(ktFiles.size())
testSuite.finish()
throw new RuntimeException("Compilation failed", ex)
}