Run stdlib tests in worker too

This commit is contained in:
SvyatoslavScherbina
2020-12-22 12:50:10 +03:00
committed by Nikolay Krasko
parent 72fc5f5aee
commit d401d29418
2 changed files with 19 additions and 4 deletions
@@ -448,6 +448,7 @@ task run_external () {
// Set up dependencies. // Set up dependencies.
dependsOn(tasksOf(RunExternalTestGroup)) dependsOn(tasksOf(RunExternalTestGroup))
dependsOn("stdlibTest") dependsOn("stdlibTest")
dependsOn("stdlibTestInWorker")
} }
task daily() { task daily() {
@@ -4922,10 +4923,22 @@ task override_konan_properties0(type: KonanDriverTest) {
} }
} }
createStdlibTest('stdlibTest', /* inWorker = */ false)
createStdlibTest('stdlibTestInWorker', /*inWorker = */ true)
/** /**
* Creates tasks to build and execute stdlib tests. * Creates tasks to build and execute stdlib tests.
*/ */
KotlinNativeTestKt.createTest(project, 'stdlibTest', KonanGTest) { task -> private void createStdlibTest(String name, boolean inWorker) {
KotlinNativeTestKt.createTest(project, name, KonanGTest) { task ->
configureStdlibTest(task, inWorker)
}
}
/**
* Configures tasks to build and execute stdlib tests.
*/
private void configureStdlibTest(KonanGTest task, boolean inWorker) {
def sources = UtilsKt.getFilesToCompile(project, def sources = UtilsKt.getFilesToCompile(project,
[ 'build/stdlib_external/stdlib', 'stdlib_external/utils.kt', [ 'build/stdlib_external/stdlib', 'stdlib_external/utils.kt',
'stdlib_external/collections', 'stdlib_external/collections',
@@ -4934,11 +4947,11 @@ KotlinNativeTestKt.createTest(project, 'stdlibTest', KonanGTest) { task ->
[ 'build/stdlib_external/stdlib/test/internalAnnotations.kt' ]) [ 'build/stdlib_external/stdlib/test/internalAnnotations.kt' ])
konanArtifacts { konanArtifacts {
program('stdlibTest', targets: [target.name]) { program(task.name, targets: [target.name]) {
srcFiles sources srcFiles sources
baseDir "$testOutputStdlib/stdlibTest" baseDir "$testOutputStdlib/$task.name"
enableMultiplatform true enableMultiplatform true
extraOpts '-tr', extraOpts inWorker ? '-trw' : '-tr',
'-Xverify-ir', '-Xverify-ir',
'-Xopt-in=kotlin.RequiresOptIn,kotlin.ExperimentalStdlibApi', '-Xopt-in=kotlin.RequiresOptIn,kotlin.ExperimentalStdlibApi',
"-friend-modules", project.rootProject.file("${project.properties['konan.home']}/klib/common/stdlib").absolutePath "-friend-modules", project.rootProject.file("${project.properties['konan.home']}/klib/common/stdlib").absolutePath
@@ -6,6 +6,8 @@
package test.text package test.text
@SharedImmutable
internal actual val surrogateCodePointDecoding: String = "\uFFFD".repeat(3) internal actual val surrogateCodePointDecoding: String = "\uFFFD".repeat(3)
@SharedImmutable
internal actual val surrogateCharEncoding: ByteArray = byteArrayOf(0xEF.toByte(), 0xBF.toByte(), 0xBD.toByte()) internal actual val surrogateCharEncoding: ByteArray = byteArrayOf(0xEF.toByte(), 0xBF.toByte(), 0xBD.toByte())