Fix lookup tracker tests after 83b32e11a7f

Standard library is no longer automatically added to the classpath when
-Xbuild-file is used. Before 83b32e11a7f, these tests worked because no
matter whether -Xbuild-file was used or not, the automatically computed
classpath (which erroneously was used to populate content roots in the
compiler) contained the standard library (see
K2JVMCompiler.configureContentRoots)

Original commit: 9e82ab38f0
This commit is contained in:
Alexander Udalov
2017-12-13 19:19:43 +01:00
parent 043e1845fb
commit cf59f84273
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.cli.common.ExitCode
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
import org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.jetbrains.kotlin.compilerRunner.*
import org.jetbrains.kotlin.config.IncrementalCompilation
import org.jetbrains.kotlin.config.Services
@@ -81,7 +82,7 @@ abstract class AbstractJvmLookupTrackerTest : AbstractLookupTrackerTest() {
outputDir = outDir,
sourcesToCompile = filesToCompile.toList(),
javaSourceRoots = listOf(JvmSourceRoot(srcDir, null)),
classpath = listOf(outDir).filter { it.exists() },
classpath = listOf(outDir, ForTestCompileRuntime.runtimeJarForTests()).filter { it.exists() },
friendDirs = emptyList()
)