Temporary workaround: use teamcity.build.tempDir instead of java.io.tmpdir

teamcity.build.tempDir is cleaned up between build executions,
 should be fixed soon on Teamcity side
This commit is contained in:
Mikhael Bogdanov
2019-04-17 08:26:41 +02:00
parent e6e0b83184
commit 01dc66b53a
+5 -1
View File
@@ -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()
}