diff --git a/buildSrc/src/main/kotlin/tasks.kt b/buildSrc/src/main/kotlin/tasks.kt index f9ec6cb956c..86b95072ee3 100644 --- a/buildSrc/src/main/kotlin/tasks.kt +++ b/buildSrc/src/main/kotlin/tasks.kt @@ -98,9 +98,13 @@ fun Project.projectTest(taskName: String = "test", body: Test.() -> Unit = {}): environment("PROJECT_BUILD_DIR", buildDir) systemProperty("jps.kotlin.home", rootProject.extra["distKotlinHomeDir"]!!) systemProperty("kotlin.ni", if (rootProject.hasProperty("newInferenceTests")) "true" else "false") - System.getProperty("teamcity.build.tempDir")?.let { + + //Temporary workaround for "not enough space" on Teamcity agents: should be fixed soon on Teamcity side + val teamcity = rootProject.property("teamcity") as? Map<*, *> + (teamcity?.get("teamcity.build.tempDir") as? String)?.let { systemProperty("java.io.tmpdir", it) } + body() }