Add test logs specific for IC with JS IR

Incremental inline will be handled during lowerings,
after all klibs are generated
This commit is contained in:
Alexey Tsvetkov
2019-08-04 22:14:10 +03:00
parent 12c209d360
commit 8e6a80bed7
13 changed files with 106 additions and 3 deletions
@@ -19,12 +19,14 @@ package org.jetbrains.kotlin.incremental.testingUtils
import java.io.File
data class BuildLogFinder(
private val isDataContainerBuildLogEnabled: Boolean = false,
private val isGradleEnabled: Boolean = false,
private val isJsEnabled: Boolean = false
private val isDataContainerBuildLogEnabled: Boolean = false,
private val isGradleEnabled: Boolean = false,
private val isJsEnabled: Boolean = false,
private val isJsIrEnabled: Boolean = false
) {
companion object {
private const val JS_LOG = "js-build.log"
private const val JS_IR_LOG = "js-ir-build.log"
private const val GRADLE_LOG = "gradle-build.log"
private const val DATA_CONTAINER_LOG = "data-container-version-build.log"
const val JS_JPS_LOG = "js-jps-build.log"
@@ -38,6 +40,7 @@ data class BuildLogFinder(
val names = dir.list() ?: arrayOf()
val files = names.filter { File(dir, it).isFile }.toSet()
val matchedName = when {
isJsIrEnabled && JS_IR_LOG in files -> JS_IR_LOG
isJsEnabled && JS_LOG in files -> JS_LOG
isGradleEnabled && GRADLE_LOG in files -> GRADLE_LOG
isJsEnabled && JS_JPS_LOG in files -> JS_JPS_LOG
@@ -1,6 +1,7 @@
package org.jetbrains.kotlin.incremental
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.incremental.testingUtils.BuildLogFinder
import java.io.File
abstract class AbstractIncrementalJsKlibCompilerRunnerTest : AbstractIncrementalJsCompilerRunnerTest() {
@@ -16,4 +17,7 @@ abstract class AbstractIncrementalJsKlibCompilerRunnerTest : AbstractIncremental
override fun rebuildAndCompareOutput(sourceRoots: List<File>, testDir: File, buildLogSteps: List<BuildStep>, outDir: File) {
// todo fix
}
override val buildLogFinder: BuildLogFinder
get() = super.buildLogFinder.copy(isJsIrEnabled = true)
}
@@ -0,0 +1,7 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,7 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,13 @@
================ Step #1 =================
Compiling files:
src/inlineGet.kt
End of files
Exit code: OK
================ Step #2 =================
Compiling files:
src/inlineSet.kt
End of files
Exit code: OK
@@ -0,0 +1,13 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
================ Step #2 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/a.kt
End of files
Exit code: OK
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,13 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
================ Step #2 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,13 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
================ Step #2 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK
@@ -0,0 +1,6 @@
================ Step #1 =================
Compiling files:
src/inline.kt
End of files
Exit code: OK