Allow to edit non-JPS build logs in "Show difference" window for non-JPS IC tests

This commit is contained in:
Alexey Tsvetkov
2017-12-07 05:02:36 +03:00
parent ff2e3ecfc4
commit 3914c1b0e9
2 changed files with 10 additions and 1 deletions
@@ -28,6 +28,9 @@ data class BuildLogFinder(
private const val GRADLE_LOG = "gradle-build.log"
private const val DATA_CONTAINER_LOG = "data-container-version-build.log"
private const val SIMPLE_LOG = "build.log"
fun isJpsLogFile(file: File): Boolean =
file.name.let { it == SIMPLE_LOG || it == DATA_CONTAINER_LOG }
}
fun findBuildLog(dir: File): File? {
@@ -81,7 +81,13 @@ abstract class AbstractIncrementalCompilerRunnerTestBase<Args : CommonCompilerAr
}
if (expectedSBWithoutErrors.toString() != actualSBWithoutErrors.toString()) {
Assert.assertEquals(expectedSB.toString(), actualSB.toString())
if (BuildLogFinder.isJpsLogFile(buildLogFile)) {
// JPS logs should be updated carefully, because standalone logs are a bit different (no removed classes, iterations, etc)
Assert.assertEquals(expectedSB.toString(), actualSB.toString())
}
else {
UsefulTestCase.assertSameLinesWithFile(buildLogFile.canonicalPath, actualSB.toString(), false)
}
}
// todo: also compare caches