Throw exception if initial build has failed in IC tests

This commit is contained in:
Alexey Tsvetkov
2017-07-12 17:49:33 +03:00
parent c7775b8d11
commit 52b638ddb3
@@ -52,7 +52,10 @@ abstract class IncrementalCompilerRunnerTestBase<Args : CommonCompilerArguments>
val sourceRoots = listOf(srcDir)
val args = createCompilerArguments(outDir, testDir)
// initial build
make(cacheDir, sourceRoots, args)
val (_, _, errors) = make(cacheDir, sourceRoots, args)
if (errors.isNotEmpty()) {
throw IllegalStateException("Initial build failed: \n${errors.joinToString("\n")}")
}
// modifications
val buildLogFile = buildLogFinder.findBuildLog(testDir) ?: throw IllegalStateException("build log file not found in $workingDir")