[Native] Drop LLDB_TRACE test directive
This directive doesn't have a lot of meaning. It is always set this way that we are getting text file with the same name as test file.
This commit is contained in:
+4
-11
@@ -12,7 +12,6 @@ import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.FREE_CINT
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.FREE_COMPILER_ARGS
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.INPUT_DATA_FILE
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.KIND
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.LLDB_TRACE
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.OUTPUT_DATA_FILE
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.OUTPUT_REGEX
|
||||
import org.jetbrains.kotlin.konan.test.blackbox.support.TestDirectives.PROGRAM_ARGS
|
||||
@@ -136,12 +135,6 @@ internal object TestDirectives : SimpleDirectivesContainer() {
|
||||
description = "Specify free CInterop tool arguments"
|
||||
)
|
||||
|
||||
val LLDB_TRACE by stringDirective(
|
||||
description = """
|
||||
Specify a filename containing the LLDB commands and the patterns that
|
||||
the output should match""".trimIndent(),
|
||||
)
|
||||
|
||||
// TODO "MUTED_WHEN" directive should be supported not only in AbstractNativeSimpleTest, but also in other hierarchies
|
||||
val MUTED_WHEN by enumDirective<MutedOption>(
|
||||
description = """
|
||||
@@ -327,13 +320,13 @@ internal fun parseEntryPoint(registeredDirectives: RegisteredDirectives, locatio
|
||||
return entryPoint
|
||||
}
|
||||
|
||||
internal fun parseLLDBSpec(baseDir: File, registeredDirectives: RegisteredDirectives, location: Location): LLDBSessionSpec {
|
||||
val specFile = parseFileBasedDirective(baseDir, LLDB_TRACE, registeredDirectives, location)
|
||||
?: fail { "$location: An LLDB session specification must be provided" }
|
||||
internal fun parseLLDBSpec(testDataFile: File): LLDBSessionSpec {
|
||||
val specFileLocation = testDataFile.absolutePath.removeSuffix(testDataFile.extension) + "txt"
|
||||
val specFile = File(specFileLocation)
|
||||
return try {
|
||||
LLDBSessionSpec.parse(specFile.readText())
|
||||
} catch (e: Exception) {
|
||||
Assertions.fail<Nothing>("$location: Cannot parse LLDB session specification: " + e.message, e)
|
||||
Assertions.fail<Nothing>("${testDataFile.absolutePath}: Cannot parse LLDB session specification: " + e.message, e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-7
@@ -204,13 +204,7 @@ internal class StandardTestCaseGroupProvider : TestCaseGroupProvider {
|
||||
fixPackageNames(testModules.values, nominalPackageName, testDataFile)
|
||||
}
|
||||
|
||||
val lldbSpec = if (testKind == TestKind.STANDALONE_LLDB)
|
||||
parseLLDBSpec(
|
||||
baseDir = testDataFile.parentFile,
|
||||
registeredDirectives,
|
||||
location
|
||||
)
|
||||
else null
|
||||
val lldbSpec = if (testKind == TestKind.STANDALONE_LLDB) parseLLDBSpec(testDataFile) else null
|
||||
|
||||
val outputMatcher = lldbSpec?.let {
|
||||
OutputMatcher(Output.STDOUT) { output -> lldbSpec.checkLLDBOutput(output, settings.get()) }
|
||||
|
||||
Reference in New Issue
Block a user