[WASM] Run all std tests with d8
This commit is contained in:
committed by
Svyatoslav Kuzmich
parent
d1c81eb6ba
commit
9519d7998b
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user