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:
Nikolay Krasko
2018-03-28 21:03:12 +03:00
parent 5d9348eea1
commit 70d236cb8d
14 changed files with 1 additions and 33 deletions
+1
View File
@@ -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)
-1
View File
@@ -33,7 +33,6 @@ sourceSets {
projectTest {
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
environment("kotlin.tests.android.timeout", "45")
}
workingDir = rootDir
-1
View File
@@ -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()
-3
View File
@@ -121,9 +121,6 @@ sourceSets {
projectTest {
dependsOn(":dist")
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar {}
-3
View File
@@ -71,9 +71,6 @@ sourceSets {
projectTest {
workingDir = rootDir
useAndroidSdk()
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar {}
-3
View File
@@ -77,9 +77,6 @@ testsJar()
projectTest {
workingDir = rootDir
useAndroidSdk()
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
configureInstrumentation()
-3
View File
@@ -58,7 +58,4 @@ testsJar()
projectTest {
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
-3
View File
@@ -51,9 +51,6 @@ sourceSets {
projectTest {
dependsOn(":dist")
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}
testsJar()
-1
View File
@@ -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)
}
}
-3
View File
@@ -47,7 +47,4 @@ testsJar {}
projectTest {
workingDir = rootDir
doFirst {
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
}
}