[WASM] Run all std tests with d8

This commit is contained in:
Igor Yakovlev
2022-04-22 19:53:21 +02:00
committed by Svyatoslav Kuzmich
parent d1c81eb6ba
commit 9519d7998b
4 changed files with 93 additions and 4 deletions
+21 -2
View File
@@ -142,8 +142,27 @@ val compileTestKotlinWasm by tasks.existing(KotlinCompile::class) {
}
}
tasks.named<KotlinJsIrLink>("compileTestDevelopmentExecutableKotlinWasm") {
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += listOf("-Xwasm-enable-array-range-checks", "-Xwasm-enable-asserts")
val compileTestDevelopmentExecutableKotlinWasm = tasks.named<KotlinJsIrLink>("compileTestDevelopmentExecutableKotlinWasm") {
(this as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += listOf("-Xwasm-enable-array-range-checks", "-Xwasm-launcher=d8")
}
val runWasmStdLibTestsWithD8 by tasks.registering(Exec::class) {
dependsOn(":js:js.tests:unzipV8")
dependsOn(compileTestDevelopmentExecutableKotlinWasm)
val unzipV8Task = tasks.getByPath(":js:js.tests:unzipV8")
val d8Path = File(unzipV8Task.outputs.files.single(), "d8")
executable = d8Path.toString()
val compiledFile = compileTestDevelopmentExecutableKotlinWasm
.get()
.kotlinOptions
.outputFile
?.let { File(it) }
check(compiledFile != null)
workingDir = compiledFile.parentFile
args = listOf("--experimental-wasm-gc", "--experimental-wasm-eh", "--module", compiledFile.name)
}
val runtimeElements by configurations.creating {}