Test: override build.log in gradle IC tests

This commit is contained in:
Alexey Tsvetkov
2016-03-15 00:12:35 +03:00
parent c1a61b17c7
commit 61814eb23f
3 changed files with 40 additions and 2 deletions
@@ -20,9 +20,11 @@ import java.io.File
class BuildLogFinder(
private val isExperimentalEnabled: Boolean = false,
private val isDataContainerBuildLogEnabled: Boolean = false
private val isDataContainerBuildLogEnabled: Boolean = false,
private val isGradleEnabled: Boolean = false
) {
companion object {
private const val GRADLE_LOG = "gradle-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 SIMPLE_LOG = "build.log"
@@ -32,6 +34,7 @@ class BuildLogFinder(
val names = dir.list() ?: arrayOf()
val files = names.filter { File(dir, it).isFile }.toSet()
val matchedName = when {
isGradleEnabled && GRADLE_LOG in files -> GRADLE_LOG
isDataContainerBuildLogEnabled && DATA_CONTAINER_LOG in files -> DATA_CONTAINER_LOG
isExperimentalEnabled && EXPERIMENTAL_LOG in files -> EXPERIMENTAL_LOG
SIMPLE_LOG in files -> SIMPLE_LOG