[K/N][Tests] Cleanup tests code from old infra
^KT-61259
This commit is contained in:
committed by
Space Team
parent
2276abfb85
commit
118a5cee06
@@ -1291,92 +1291,6 @@ standaloneTest("interop_opengl_teapot") {
|
||||
*/
|
||||
|
||||
if (PlatformInfo.isAppleTarget(project)) {
|
||||
interopTest("interop_objc_smoke") {
|
||||
enabled = !isNoopGC
|
||||
source = "interop/objc/smoke.kt"
|
||||
interop = 'objcSmoke'
|
||||
doBeforeBuild {
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcsmoke.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/smoke.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
|
||||
copy {
|
||||
from("interop/objc/Localizable.stringsdict")
|
||||
into("$testOutputLocal/$name/$target/en.lproj/")
|
||||
}
|
||||
}
|
||||
useGoldenData = true
|
||||
}
|
||||
|
||||
interopTest("interop_objc_smoke_noopgc") {
|
||||
enabled = isNoopGC
|
||||
source = "interop/objc/smoke_noopgc.kt"
|
||||
interop = 'objcSmoke'
|
||||
verifyIr = false // KT-57716
|
||||
doBeforeBuild {
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjcsmoke.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/smoke.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
|
||||
copy {
|
||||
from("interop/objc/Localizable.stringsdict")
|
||||
into("$testOutputLocal/$name/$target/en.lproj/")
|
||||
}
|
||||
}
|
||||
// No deallocations for the no-op GC.
|
||||
useGoldenData = true
|
||||
}
|
||||
|
||||
interopTestMultifile("interop_objc_tests") {
|
||||
source = "interop/objc/tests/"
|
||||
interop = 'objcTests'
|
||||
flags = ['-tr', '-e', 'main', '-opt-in=kotlin.native.internal.InternalForKotlinNative']
|
||||
|
||||
if (isNoopGC) {
|
||||
def exclude = [
|
||||
"Kt41811Kt.*",
|
||||
"CustomStringKt.testCustomString",
|
||||
"Kt42482Kt.testKT42482",
|
||||
"ObjcWeakRefsKt.testObjCWeakRef",
|
||||
"WeakRefsKt.testWeakRefs"
|
||||
]
|
||||
arguments += ["--ktest_filter=*-${exclude.join(":")}"]
|
||||
}
|
||||
|
||||
doBeforeBuild {
|
||||
def dylibFile = project.layout.buildDirectory.file("libobjctests.dylib").get().asFile
|
||||
mkdir(dylibFile.parentFile)
|
||||
project.extensions.execClang.execClangForCompilerTests(project.target) {
|
||||
args fileTree("$projectDir/interop/objc/tests/") { include '**/*.m' }
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', dylibFile.toString()
|
||||
// Enable ARC optimizations to prevent some objects from leaking in Obj-C code due to exceptions:
|
||||
args '-O2'
|
||||
}
|
||||
if (UtilsKt.isSimulatorTarget(project, project.target)) {
|
||||
UtilsKt.codesign(project, dylibFile.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
standaloneTest("interop_objc_kt61441") {
|
||||
source = "interop/objc/kt61441.kt"
|
||||
UtilsKt.dependsOnPlatformLibs(it)
|
||||
|
||||
@@ -95,7 +95,6 @@ internal class TestProcessor(val suites: List<TestSuite>, val args: Array<String
|
||||
// must be in sync with `fromGTestPattern(String)` in native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/runner/TestRun.kt
|
||||
private fun fromGTestPattern(pattern: String): Regex {
|
||||
val result = StringBuilder()
|
||||
result.append("^")
|
||||
var prevIndex = 0
|
||||
pattern.forEachIndexed { index, c ->
|
||||
if (c == '*' || c == '?') {
|
||||
@@ -105,7 +104,6 @@ internal class TestProcessor(val suites: List<TestSuite>, val args: Array<String
|
||||
}
|
||||
}
|
||||
result.append(pattern.substringEscaped(prevIndex until pattern.length))
|
||||
result.append("$")
|
||||
return result.toString().toRegex()
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -142,7 +142,6 @@ internal inline fun <reified T : TestRunParameter> List<TestRunParameter>.get(on
|
||||
// must be in sync with `fromGTestPattern(String)` in kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt
|
||||
internal fun fromGTestPattern(pattern: String): Regex {
|
||||
val result = StringBuilder()
|
||||
result.append("^")
|
||||
var prevIndex = 0
|
||||
pattern.forEachIndexed { index, c ->
|
||||
if (c == '*' || c == '?') {
|
||||
@@ -152,7 +151,6 @@ internal fun fromGTestPattern(pattern: String): Regex {
|
||||
}
|
||||
}
|
||||
result.append(pattern.substringEscaped(prevIndex until pattern.length))
|
||||
result.append("$")
|
||||
return result.toString().toRegex()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user