Update tests after compiler properties rework

#KT-43605 Fixed
This commit is contained in:
Alexander Likhachev
2021-02-14 09:53:16 +03:00
parent 3537c699b5
commit 70d434e992
10 changed files with 63 additions and 53 deletions
@@ -336,16 +336,19 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
@TaskAction
fun execute(inputs: IncrementalTaskInputs) {
CompilerSystemProperties.systemPropertyGetter = {
val value = if (it in kotlinDaemonProperties) kotlinDaemonProperties[it] else System.getProperty(it)
logger.warn("System property read $it = $value (declared: ${it in kotlinDaemonProperties})")
value
if (it in kotlinDaemonProperties) kotlinDaemonProperties[it] else System.getProperty(it)
}
CompilerSystemProperties.systemPropertySetter = setter@{ key, value ->
val oldValue = kotlinDaemonProperties[key]
if (oldValue == value) return@setter oldValue
kotlinDaemonProperties[key] = value
System.setProperty(key, value)
logger.warn("System property set $key = $value (was: $oldValue)")
oldValue
}
CompilerSystemProperties.systemPropertyCleaner = {
val oldValue = kotlinDaemonProperties[it]
kotlinDaemonProperties.remove(it)
System.clearProperty(it)
oldValue
}
CompilerSystemProperties.KOTLIN_COMPILER_ENVIRONMENT_KEEPALIVE_PROPERTY.value = "true"