Fix file root access failure in configure tests
This commit is contained in:
@@ -22,6 +22,7 @@ import com.intellij.openapi.module.ModuleManager
|
|||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.util.io.FileUtil
|
import com.intellij.openapi.util.io.FileUtil
|
||||||
import com.intellij.openapi.util.io.FileUtilRt
|
import com.intellij.openapi.util.io.FileUtilRt
|
||||||
|
import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess
|
||||||
import com.intellij.testFramework.PlatformTestCase
|
import com.intellij.testFramework.PlatformTestCase
|
||||||
import com.intellij.testFramework.UsefulTestCase
|
import com.intellij.testFramework.UsefulTestCase
|
||||||
import junit.framework.TestCase
|
import junit.framework.TestCase
|
||||||
@@ -31,6 +32,25 @@ import java.io.File
|
|||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
|
|
||||||
abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
||||||
|
override fun setUp() {
|
||||||
|
super.setUp()
|
||||||
|
|
||||||
|
val distPaths = with(PathUtil.kotlinPathsForIdeaPlugin) {
|
||||||
|
listOf(
|
||||||
|
stdlibPath,
|
||||||
|
stdlibSourcesPath,
|
||||||
|
reflectPath,
|
||||||
|
kotlinTestPath,
|
||||||
|
jsKotlinTestJarPath,
|
||||||
|
jsStdLibJarPath,
|
||||||
|
jsStdLibSrcJarPath
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
for (path in distPaths) {
|
||||||
|
VfsRootAccess.allowRootAccess(testRootDisposable, path.absolutePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Throws(Exception::class)
|
@Throws(Exception::class)
|
||||||
override fun tearDown() {
|
override fun tearDown() {
|
||||||
@@ -143,7 +163,7 @@ abstract class AbstractConfigureKotlinTest : PlatformTestCase() {
|
|||||||
jarFromDist: String,
|
jarFromDist: String,
|
||||||
jarFromTemp: String
|
jarFromTemp: String
|
||||||
) {
|
) {
|
||||||
val project = modules.iterator().next().project
|
val project = modules.first().project
|
||||||
val collector = createConfigureKotlinNotificationCollector(project)
|
val collector = createConfigureKotlinNotificationCollector(project)
|
||||||
|
|
||||||
val pathToJar = getPathToJar(runtimeState, jarFromDist, jarFromTemp)
|
val pathToJar = getPathToJar(runtimeState, jarFromDist, jarFromTemp)
|
||||||
|
|||||||
Reference in New Issue
Block a user