Test: override build.log in gradle IC tests
This commit is contained in:
@@ -20,9 +20,11 @@ import java.io.File
|
|||||||
|
|
||||||
class BuildLogFinder(
|
class BuildLogFinder(
|
||||||
private val isExperimentalEnabled: Boolean = false,
|
private val isExperimentalEnabled: Boolean = false,
|
||||||
private val isDataContainerBuildLogEnabled: Boolean = false
|
private val isDataContainerBuildLogEnabled: Boolean = false,
|
||||||
|
private val isGradleEnabled: Boolean = false
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
|
private const val GRADLE_LOG = "gradle-build.log"
|
||||||
private const val DATA_CONTAINER_LOG = "data-container-version-build.log"
|
private const val DATA_CONTAINER_LOG = "data-container-version-build.log"
|
||||||
private const val EXPERIMENTAL_LOG = "experimental-ic-build.log"
|
private const val EXPERIMENTAL_LOG = "experimental-ic-build.log"
|
||||||
private const val SIMPLE_LOG = "build.log"
|
private const val SIMPLE_LOG = "build.log"
|
||||||
@@ -32,6 +34,7 @@ class BuildLogFinder(
|
|||||||
val names = dir.list() ?: arrayOf()
|
val names = dir.list() ?: arrayOf()
|
||||||
val files = names.filter { File(dir, it).isFile }.toSet()
|
val files = names.filter { File(dir, it).isFile }.toSet()
|
||||||
val matchedName = when {
|
val matchedName = when {
|
||||||
|
isGradleEnabled && GRADLE_LOG in files -> GRADLE_LOG
|
||||||
isDataContainerBuildLogEnabled && DATA_CONTAINER_LOG in files -> DATA_CONTAINER_LOG
|
isDataContainerBuildLogEnabled && DATA_CONTAINER_LOG in files -> DATA_CONTAINER_LOG
|
||||||
isExperimentalEnabled && EXPERIMENTAL_LOG in files -> EXPERIMENTAL_LOG
|
isExperimentalEnabled && EXPERIMENTAL_LOG in files -> EXPERIMENTAL_LOG
|
||||||
SIMPLE_LOG in files -> SIMPLE_LOG
|
SIMPLE_LOG in files -> SIMPLE_LOG
|
||||||
|
|||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Exit code: NOTHING_DONE
|
||||||
|
------------------------------------------
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.java
|
||||||
|
End of files
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/UseKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/use.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ABORT
|
||||||
|
------------------------------------------
|
||||||
|
COMPILATION FAILED
|
||||||
|
When expression must be exhaustive, add necessary 'C' branch or 'else' branch instead
|
||||||
|
|
||||||
|
================ Step #2 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/Enum.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/use.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
|
Compiling files:
|
||||||
|
src/Enum.java
|
||||||
|
End of files
|
||||||
+1
-1
@@ -34,7 +34,7 @@ class KotlinGradlePluginJpsParametrizedCLIOnly : BaseIncrementalGradleIT() {
|
|||||||
File(jpsResourcesPath, "changeIncrementalOption"),
|
File(jpsResourcesPath, "changeIncrementalOption"),
|
||||||
File(jpsResourcesPath, "custom"),
|
File(jpsResourcesPath, "custom"),
|
||||||
File(jpsResourcesPath, "lookupTracker"))
|
File(jpsResourcesPath, "lookupTracker"))
|
||||||
private val buildLogFinder = BuildLogFinder(isExperimentalEnabled = true)
|
private val buildLogFinder = BuildLogFinder(isExperimentalEnabled = true, isGradleEnabled = true)
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@Parameterized.Parameters(name = "{index}: {0}")
|
@Parameterized.Parameters(name = "{index}: {0}")
|
||||||
|
|||||||
Reference in New Issue
Block a user