[Native][tests] Fix warnings in debugger tests
This commit is contained in:
+3
-2
@@ -32,6 +32,7 @@ class ToolDriver(
|
|||||||
else
|
else
|
||||||
arrayOf("-target", target())
|
arrayOf("-target", target())
|
||||||
|
|
||||||
|
@Suppress("UNUSED_PARAMETER")
|
||||||
private fun compile(output: Path, vararg args: String, argsCalculator:() -> Array<String>) {
|
private fun compile(output: Path, vararg args: String, argsCalculator:() -> Array<String>) {
|
||||||
check(!Files.exists(output))
|
check(!Files.exists(output))
|
||||||
val allArgs = arrayOf(*crossPlatform(), *argsCalculator())
|
val allArgs = arrayOf(*crossPlatform(), *argsCalculator())
|
||||||
@@ -74,9 +75,9 @@ class ToolDriver(
|
|||||||
DwarfUtilParser().parse(StringReader(out)).tags.toList().processor()
|
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 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
-1
@@ -1,6 +1,6 @@
|
|||||||
package org.jetbrains.kotlin.native.test.debugger
|
package org.jetbrains.kotlin.native.test.debugger
|
||||||
|
|
||||||
import junit.framework.Assert.*
|
import org.junit.Assert.*
|
||||||
import org.junit.Ignore
|
import org.junit.Ignore
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -173,7 +173,7 @@ fun dwarfDumpComplexTest(test:ToolDriverHelper.()->Unit) {
|
|||||||
|
|
||||||
with(Files.createTempDirectory("dwarfdump_test_complex")) {
|
with(Files.createTempDirectory("dwarfdump_test_complex")) {
|
||||||
toFile().deleteOnExit()
|
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")) {
|
with(Files.createTempDirectory("lldb_test_complex")) {
|
||||||
toFile().deleteOnExit()
|
toFile().deleteOnExit()
|
||||||
val driver = ToolDriverHelper(ToolDriver(), this).test()
|
ToolDriverHelper(ToolDriver(), this).test()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user