[Native][tests] Add full path to CLI compiler to the log
So the log now has a command to be run in terminal as is.
This commit is contained in:
committed by
Space
parent
eb78f5e1ca
commit
ff85d54c93
+3
-1
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.cli.common.ExitCode
|
|||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.RunResult
|
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.RunResult
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.TestRunParameter
|
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.TestRunParameter
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.get
|
import org.jetbrains.kotlin.konan.blackboxtest.support.runner.get
|
||||||
|
import org.jetbrains.kotlin.konan.blackboxtest.support.settings.KotlinNativeHome
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.SafeEnvVars
|
import org.jetbrains.kotlin.konan.blackboxtest.support.util.SafeEnvVars
|
||||||
import org.jetbrains.kotlin.konan.blackboxtest.support.util.SafeProperties
|
import org.jetbrains.kotlin.konan.blackboxtest.support.util.SafeProperties
|
||||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||||
@@ -50,6 +51,7 @@ internal abstract class LoggedData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class CompilerParameters(
|
class CompilerParameters(
|
||||||
|
private val home: KotlinNativeHome,
|
||||||
private val compilerArgs: Array<String>,
|
private val compilerArgs: Array<String>,
|
||||||
private val sourceModules: Collection<TestModule>,
|
private val sourceModules: Collection<TestModule>,
|
||||||
private val environment: JVMEnvironment = JVMEnvironment() // Capture environment.
|
private val environment: JVMEnvironment = JVMEnvironment() // Capture environment.
|
||||||
@@ -64,7 +66,7 @@ internal abstract class LoggedData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun computeText() = buildString {
|
override fun computeText() = buildString {
|
||||||
appendArguments("COMPILER ARGUMENTS:", listOf("\$\$kotlinc-native\$\$") + compilerArgs)
|
appendArguments("COMPILER ARGUMENTS:", listOf(home.dir.resolve("bin/kotlinc-native").path) + compilerArgs)
|
||||||
appendLine()
|
appendLine()
|
||||||
appendLine(environment)
|
appendLine(environment)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ internal abstract class BasicCompilation<A : TestCompilationArtifact>(
|
|||||||
applySources()
|
applySources()
|
||||||
}
|
}
|
||||||
|
|
||||||
val loggedCompilerParameters = LoggedData.CompilerParameters(compilerArgs, sourceModules)
|
val loggedCompilerParameters = LoggedData.CompilerParameters(home, compilerArgs, sourceModules)
|
||||||
|
|
||||||
val (loggedCompilerCall: LoggedData, result: TestCompilationResult.ImmediateResult<out A>) = try {
|
val (loggedCompilerCall: LoggedData, result: TestCompilationResult.ImmediateResult<out A>) = try {
|
||||||
val (exitCode, compilerOutput, compilerOutputHasErrors, duration) = callCompiler(
|
val (exitCode, compilerOutput, compilerOutputHasErrors, duration) = callCompiler(
|
||||||
|
|||||||
Reference in New Issue
Block a user