[TEST] Add implementation of new infrastructure services for compiler tests

All of new classes lays in lays in :compiler:tests-common-new module
  which includes classes for FE 1.0 and FIR diagnostics tests and
  JVM black boxtests
This commit is contained in:
Dmitriy Novozhilov
2020-12-02 17:22:12 +03:00
parent dd402b16d9
commit cb5183ab4d
80 changed files with 4153 additions and 19 deletions
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.script
import org.jetbrains.kotlin.cli.jvm.plugins.PluginCliParser
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.utils.PathUtil
import java.io.File
fun loadScriptingPlugin(configuration: CompilerConfiguration) {
val libPath = PathUtil.kotlinPathsForCompiler.libPath
val pluginClasspath = with (PathUtil) {
listOf(
KOTLIN_SCRIPTING_COMPILER_PLUGIN_JAR,
KOTLIN_SCRIPTING_COMPILER_IMPL_JAR,
KOTLIN_SCRIPTING_COMMON_JAR,
KOTLIN_SCRIPTING_JVM_JAR
).map { File(libPath, it).path }
}
PluginCliParser.loadPluginsSafe(pluginClasspath, null, configuration)
}