unit-tests: Create a simple test runner implementation
This commit is contained in:
committed by
ilmat192
parent
77195e8e90
commit
f26e5b5f02
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.cli.common.CLICompiler
|
||||
import org.jetbrains.kotlin.cli.common.CLITool
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.ERROR
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.WARNING
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
@@ -133,6 +134,8 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
|
||||
put(ENABLE_ASSERTIONS, arguments.enableAssertions)
|
||||
|
||||
put(GENERATE_TEST_RUNNER, arguments.generateTestRunner)
|
||||
|
||||
// We need to download dependencies only if we use them ( = there are files to compile).
|
||||
put(CHECK_DEPENDENCIES, if (configuration.kotlinSourceRoots.isNotEmpty()) {
|
||||
true
|
||||
|
||||
@@ -24,11 +24,14 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
|
||||
// Prepend them with a single dash.
|
||||
// Keep the list lexically sorted.
|
||||
|
||||
@Argument(value = "-enable_assertions", shortName = "-ea", description = "Enable runtime assertions in generated code")
|
||||
var enableAssertions: Boolean = false
|
||||
|
||||
@Argument(value = "-g", description = "Enable emitting debug information")
|
||||
var debug: Boolean = false
|
||||
|
||||
@Argument(value = "-enable_assertions", shortName = "-ea", description = "Enable runtime assertions in generated code")
|
||||
var enableAssertions: Boolean = false
|
||||
@Argument(value = "-generate_test_runner", shortName = "-tr", description = "Produce a runner for unit tests")
|
||||
var generateTestRunner: Boolean = false
|
||||
|
||||
@Argument(value = "-includeBinary", shortName = "-ib", valueDescription = "<path>", description = "Pack external binary within the klib")
|
||||
var includeBinaries: Array<String>? = null
|
||||
|
||||
Reference in New Issue
Block a user