mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
[Native][tests] Fix warnings in debugger tests
This commit is contained in:
@@ -32,6 +32,7 @@ class ToolDriver(
|
||||
else
|
||||
arrayOf("-target", target())
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
private fun compile(output: Path, vararg args: String, argsCalculator:() -> Array<String>) {
|
||||
check(!Files.exists(output))
|
||||
val allArgs = arrayOf(*crossPlatform(), *argsCalculator())
|
||||
@@ -74,9 +75,9 @@ class ToolDriver(
|
||||
DwarfUtilParser().parse(StringReader(out)).tags.toList().processor()
|
||||
}
|
||||
|
||||
fun swiftc(output: Path, swiftSrc: Path, vararg args: String) {
|
||||
fun swiftc(output: Path, swiftSrc: Path, vararg args: String): String {
|
||||
val swiftProcess = subprocess(DistProperties.swiftc, "-o", output.toString(), swiftSrc.toString(), *args)
|
||||
val out = swiftProcess.takeIf { it.process.exitValue() == 0 }?.stdout ?: error(swiftProcess.stderr)
|
||||
return swiftProcess.takeIf { it.process.exitValue() == 0 }?.stdout ?: error(swiftProcess.stderr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.jetbrains.kotlin.native.test.debugger
|
||||
|
||||
import junit.framework.Assert.*
|
||||
import org.junit.Assert.*
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ fun dwarfDumpComplexTest(test:ToolDriverHelper.()->Unit) {
|
||||
|
||||
with(Files.createTempDirectory("dwarfdump_test_complex")) {
|
||||
toFile().deleteOnExit()
|
||||
val driver = ToolDriverHelper(ToolDriver(), this).test()
|
||||
ToolDriverHelper(ToolDriver(), this).test()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ fun lldbComplexTest(test:ToolDriverHelper.()->Unit) {
|
||||
|
||||
with(Files.createTempDirectory("lldb_test_complex")) {
|
||||
toFile().deleteOnExit()
|
||||
val driver = ToolDriverHelper(ToolDriver(), this).test()
|
||||
ToolDriverHelper(ToolDriver(), this).test()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user