[Gradle, K/N] Tests cleanup

This commit is contained in:
Alexander.Likhachev
2020-10-13 22:40:27 +03:00
parent 4b68678a36
commit f0aa4a59e3
6 changed files with 14 additions and 52 deletions
@@ -618,13 +618,9 @@ class GeneralNativeIT : BaseGradleIT() {
// Check that test binaries can be accessed in a buildscript.
build("checkNewGetters") {
assertSuccessful()
val suffixes = listOf("kexe")
val suffix = if (HostManager.hostIsMingw) "exe" else "kexe"
val names = listOf("test", "another")
val files = names.flatMap { name ->
suffixes.map { suffix ->
"$name.$suffix"
}
}
val files = names.map { "$it.$suffix" }
files.forEach {
assertContains("Get test: $it")
@@ -74,23 +74,5 @@ kotlin {
// Using a typed getter:
println("Check run task: ${binaries.getExecutable("foo", RELEASE).runTask.name}")
}
iosArm64("ios") {
binaries {
framework {
export project(':exported')
}
framework('custom', [RELEASE]) {
embedBitcode = 'DISABLE'
linkerOpts = ['-L.']
freeCompilerArgs = ["-Xtime"]
isStatic = true
}
}
}
iosX64("iosSim") {
binaries {
framework()
}
}
}
}
@@ -63,24 +63,4 @@ kotlin {
// Using a typed getter:
println("Check run task: ${binaries.getExecutable("foo", RELEASE).runTask?.name}")
}
iosArm64("ios") {
binaries {
framework {
export(project(":exported"))
}
framework("custom", listOf(RELEASE)) {
embedBitcode("disable")
linkerOpts = mutableListOf("-L.")
freeCompilerArgs = mutableListOf("-Xtime")
isStatic = true
}
}
}
iosX64("iosSim") {
binaries {
framework()
}
}
}
@@ -8,18 +8,10 @@ repositories {
}
kotlin {
val commonNative by sourceSets.creating {}
<SingleNativeTarget>("host") {
compilations["main"].defaultSourceSet {
dependsOn(commonNative)
}
compilations.all {
kotlinOptions.verbose = true
enableEndorsedLibs = true
}
binaries {
executable(listOf(DEBUG))
}
}
}
@@ -0,0 +1,12 @@
import kotlinx.cli.*
fun main(args: Array<String>) {
val argParser = ArgParser("test")
val mode by argParser.option(
ArgType.Choice(listOf("video", "audio", "both")), shortName = "m", description = "Play mode")
.default("both")
val size by argParser.option(ArgType.Int, shortName = "s", description = "Required size of videoplayer window")
.delimiter(",")
val fileName by argParser.argument(ArgType.String, description = "File to play")
argParser.parse(args)
}