[Wasm] Extract Fir compiler tests into :wasmFirCompilerTest task
This is needed to run K1 and K2 tests in parallel on separate CI agents
This commit is contained in:
+6
-1
@@ -671,13 +671,18 @@ tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
register("wasmCompilerTest") {
|
register("wasmCompilerTest") {
|
||||||
dependsOn(":wasm:wasm.tests:test")
|
dependsOn(":wasm:wasm.tests:testK1")
|
||||||
|
dependsOn(":wasm:wasm.tests:diagnosticTest")
|
||||||
// Windows WABT release requires Visual C++ Redistributable
|
// Windows WABT release requires Visual C++ Redistributable
|
||||||
if (!kotlinBuildProperties.isTeamcityBuild || !org.gradle.internal.os.OperatingSystem.current().isWindows) {
|
if (!kotlinBuildProperties.isTeamcityBuild || !org.gradle.internal.os.OperatingSystem.current().isWindows) {
|
||||||
dependsOn(":wasm:wasm.ir:test")
|
dependsOn(":wasm:wasm.ir:test")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
register("wasmFirCompilerTest") {
|
||||||
|
dependsOn(":wasm:wasm.tests:testFir")
|
||||||
|
}
|
||||||
|
|
||||||
register("nativeCompilerTest") {
|
register("nativeCompilerTest") {
|
||||||
dependsOn(":native:kotlin-native-utils:test")
|
dependsOn(":native:kotlin-native-utils:test")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,20 +133,37 @@ val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateWa
|
|||||||
dependsOn(":compiler:generateTestData")
|
dependsOn(":compiler:generateTestData")
|
||||||
}
|
}
|
||||||
|
|
||||||
projectTest(
|
fun Project.wasmProjectTest(
|
||||||
taskName = "test",
|
taskName: String,
|
||||||
parallel = true,
|
body: Test.() -> Unit = {}
|
||||||
jUnitMode = JUnitMode.JUnit5
|
): TaskProvider<Test> {
|
||||||
) {
|
return projectTest(
|
||||||
workingDir = rootDir
|
taskName = taskName,
|
||||||
include("**/diagnostics/*.class")
|
parallel = true,
|
||||||
include("**/FirWasm*.class")
|
jUnitMode = JUnitMode.JUnit5
|
||||||
include("**/K1Wasm*.class")
|
) {
|
||||||
include("**/Wasm*.class")
|
workingDir = rootDir
|
||||||
setupV8()
|
setupV8()
|
||||||
setupSpiderMonkey()
|
setupSpiderMonkey()
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
setupWasmStdlib()
|
setupWasmStdlib()
|
||||||
setupGradlePropertiesForwarding()
|
setupGradlePropertiesForwarding()
|
||||||
systemProperty("kotlin.wasm.test.root.out.dir", "$buildDir/")
|
systemProperty("kotlin.wasm.test.root.out.dir", "$buildDir/")
|
||||||
|
body()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test everything
|
||||||
|
wasmProjectTest("test")
|
||||||
|
|
||||||
|
wasmProjectTest("testFir") {
|
||||||
|
include("**/Fir*.class")
|
||||||
|
}
|
||||||
|
|
||||||
|
wasmProjectTest("testK1") {
|
||||||
|
include("**/K1*.class")
|
||||||
|
}
|
||||||
|
|
||||||
|
wasmProjectTest("diagnosticTest") {
|
||||||
|
include("**/Diagnostics*.class")
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user