From 32bc2b55ed024a98e78887031be370bc4c11321b Mon Sep 17 00:00:00 2001 From: "Aleksei.Cherepanov" Date: Mon, 15 Jan 2024 17:51:05 +0100 Subject: [PATCH] Show compiler error in diff if JPS IC test fails --- .../kotlin/jps/build/AbstractIncrementalJpsTest.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt index e96a408c4b5..b3b168a44c7 100644 --- a/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt +++ b/jps/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/AbstractIncrementalJpsTest.kt @@ -337,11 +337,13 @@ abstract class AbstractIncrementalJpsTest( buildLogFile?.let { val logs = createBuildLog(otherMakeResults) - val expected = excludeCompilerErrorMessagesFromLog(File(buildLogFile.absolutePath).readText()) + val buildLog = File(buildLogFile.absolutePath).readText() + val expected = excludeCompilerErrorMessagesFromLog(buildLog) val actual = excludeCompilerErrorMessagesFromLog(logs) - UsefulTestCase.assertEquals(expected.trimEnd(), actual.trimEnd()) - + if(expected.trimEnd() != actual.trimEnd()) { + UsefulTestCase.assertEquals(buildLog, logs) + } val lastMakeResult = otherMakeResults.last() clearCachesRebuildAndCheckOutput(lastMakeResult) }