Always configure "idea.home.path" system variable
When TestLoggerFactory is initialized in tests it checks that variable
and it it's not present uses classpath to search for logger configuration.
If this search is unsuccessful a lot of exceptions are written to log:
java.lang.RuntimeException: Could not find installation home path. Please make sure bin/idea.properties is present in the installation directory.
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:96)
at com.intellij.testFramework.TestLoggerFactory.reconfigure(TestLoggerFactory.java:67)
This commit is contained in:
@@ -70,6 +70,7 @@ fun Project.projectTest(taskName: String = "test", body: Test.() -> Unit = {}):
|
||||
jvmArgs("-ea", "-XX:+HeapDumpOnOutOfMemoryError", "-Xmx1100m", "-XX:+UseCodeCacheFlushing", "-XX:ReservedCodeCacheSize=128m", "-Djna.nosys=true")
|
||||
maxHeapSize = "1100m"
|
||||
systemProperty("idea.is.unit.test", "true")
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
environment("NO_FS_ROOTS_ACCESS_CHECK", "true")
|
||||
environment("PROJECT_CLASSES_DIRS", the<JavaPluginConvention>().sourceSets.getByName("test").output.classesDirs.asPath)
|
||||
environment("PROJECT_BUILD_DIR", buildDir)
|
||||
|
||||
@@ -33,7 +33,6 @@ sourceSets {
|
||||
|
||||
projectTest {
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
environment("kotlin.tests.android.timeout", "45")
|
||||
}
|
||||
workingDir = rootDir
|
||||
|
||||
@@ -108,7 +108,6 @@ projectTest {
|
||||
doFirst {
|
||||
systemProperty("kotlin.ant.classpath", antLauncherJar.asPath)
|
||||
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,6 @@ sourceSets {
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
testsJar()
|
||||
|
||||
@@ -121,9 +121,6 @@ sourceSets {
|
||||
projectTest {
|
||||
dependsOn(":dist")
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
@@ -71,9 +71,6 @@ sourceSets {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
useAndroidSdk()
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
|
||||
@@ -77,9 +77,6 @@ testsJar()
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
useAndroidSdk()
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
configureInstrumentation()
|
||||
|
||||
@@ -58,7 +58,4 @@ testsJar()
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,9 +51,6 @@ sourceSets {
|
||||
projectTest {
|
||||
dependsOn(":dist")
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
testsJar()
|
||||
|
||||
@@ -64,7 +64,6 @@ projectTest {
|
||||
doFirst {
|
||||
systemProperty("kotlin.ant.classpath", antLauncherJar.asPath)
|
||||
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,9 +67,6 @@ projectTest {
|
||||
workingDir = rootDir
|
||||
useAndroidSdk()
|
||||
useAndroidJar()
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
runtimeJar()
|
||||
|
||||
@@ -36,9 +36,6 @@ sourceSets {
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
useAndroidSdk()
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
testsJar {}
|
||||
@@ -44,7 +44,4 @@ ideaPlugin {
|
||||
projectTest {
|
||||
dependsOn(":kotlin-stdlib:jvm-minimal-for-test:dist")
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,4 @@ testsJar {}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
doFirst {
|
||||
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user