Disable @SourceDebugExtension generation in jvm-abi-gen tests
In these two tests, contents of the annotation differ by design, and that does not constitute a difference in ABI.
This commit is contained in:
@@ -54,7 +54,7 @@ abstract class BaseJvmAbiTest : TestCase() {
|
|||||||
get() = if (name == null) workingDir.resolve("javaOut") else workingDir.resolve("$name/javaOut")
|
get() = if (name == null) workingDir.resolve("javaOut") else workingDir.resolve("$name/javaOut")
|
||||||
|
|
||||||
val directives: File
|
val directives: File
|
||||||
get() = workingDir.resolve("directives.txt")
|
get() = projectDir.resolve("directives.txt")
|
||||||
|
|
||||||
override fun toString(): String =
|
override fun toString(): String =
|
||||||
"compilation '$name'"
|
"compilation '$name'"
|
||||||
@@ -69,6 +69,8 @@ abstract class BaseJvmAbiTest : TestCase() {
|
|||||||
dep.abiDir
|
dep.abiDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val directives = if (compilation.directives.exists()) compilation.directives.readText() else null
|
||||||
|
|
||||||
val messageCollector = LocationReportingTestMessageCollector()
|
val messageCollector = LocationReportingTestMessageCollector()
|
||||||
val compiler = K2JVMCompiler()
|
val compiler = K2JVMCompiler()
|
||||||
val args = compiler.createArguments().apply {
|
val args = compiler.createArguments().apply {
|
||||||
@@ -81,9 +83,12 @@ abstract class BaseJvmAbiTest : TestCase() {
|
|||||||
).toTypedArray()
|
).toTypedArray()
|
||||||
destination = compilation.destinationDir.canonicalPath
|
destination = compilation.destinationDir.canonicalPath
|
||||||
useOldBackend = !useIrBackend
|
useOldBackend = !useIrBackend
|
||||||
languageVersion = if (!compilation.directives.exists()) null else {
|
languageVersion =
|
||||||
InTextDirectivesUtils.findStringWithPrefixes(compilation.directives.readText(), "// LANGUAGE_VERSION:")
|
if (directives != null)
|
||||||
}
|
InTextDirectivesUtils.findStringWithPrefixes(directives, "// LANGUAGE_VERSION:")
|
||||||
|
else null
|
||||||
|
noSourceDebugExtension =
|
||||||
|
directives != null && InTextDirectivesUtils.findStringWithPrefixes(directives, "// NO_SOURCE_DEBUG_EXTENSION") != null
|
||||||
}
|
}
|
||||||
val exitCode = compiler.exec(messageCollector, Services.EMPTY, args)
|
val exitCode = compiler.exec(messageCollector, Services.EMPTY, args)
|
||||||
if (exitCode != ExitCode.OK || messageCollector.errors.isNotEmpty()) {
|
if (exitCode != ExitCode.OK || messageCollector.errors.isNotEmpty()) {
|
||||||
@@ -118,4 +123,4 @@ abstract class BaseJvmAbiTest : TestCase() {
|
|||||||
protected val kotlinJvmStdlib = File("dist/kotlinc/lib/kotlin-stdlib.jar").also {
|
protected val kotlinJvmStdlib = File("dist/kotlinc/lib/kotlin-stdlib.jar").also {
|
||||||
check(it.exists()) { "Stdlib file '$it' does not exist" }
|
check(it.exists()) { "Stdlib file '$it' does not exist" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -1 +1,2 @@
|
|||||||
// IGNORE_BACKEND_LEGACY: JVM
|
// IGNORE_BACKEND_LEGACY: JVM
|
||||||
|
// NO_SOURCE_DEBUG_EXTENSION
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
// IGNORE_BACKEND_LEGACY: JVM
|
// IGNORE_BACKEND_LEGACY: JVM
|
||||||
|
// NO_SOURCE_DEBUG_EXTENSION
|
||||||
|
|||||||
Reference in New Issue
Block a user