[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") {
|
||||
dependsOn(":wasm:wasm.tests:test")
|
||||
dependsOn(":wasm:wasm.tests:testK1")
|
||||
dependsOn(":wasm:wasm.tests:diagnosticTest")
|
||||
// Windows WABT release requires Visual C++ Redistributable
|
||||
if (!kotlinBuildProperties.isTeamcityBuild || !org.gradle.internal.os.OperatingSystem.current().isWindows) {
|
||||
dependsOn(":wasm:wasm.ir:test")
|
||||
}
|
||||
}
|
||||
|
||||
register("wasmFirCompilerTest") {
|
||||
dependsOn(":wasm:wasm.tests:testFir")
|
||||
}
|
||||
|
||||
register("nativeCompilerTest") {
|
||||
dependsOn(":native:kotlin-native-utils:test")
|
||||
}
|
||||
|
||||
@@ -133,20 +133,37 @@ val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateWa
|
||||
dependsOn(":compiler:generateTestData")
|
||||
}
|
||||
|
||||
projectTest(
|
||||
taskName = "test",
|
||||
parallel = true,
|
||||
jUnitMode = JUnitMode.JUnit5
|
||||
) {
|
||||
workingDir = rootDir
|
||||
include("**/diagnostics/*.class")
|
||||
include("**/FirWasm*.class")
|
||||
include("**/K1Wasm*.class")
|
||||
include("**/Wasm*.class")
|
||||
setupV8()
|
||||
setupSpiderMonkey()
|
||||
useJUnitPlatform()
|
||||
setupWasmStdlib()
|
||||
setupGradlePropertiesForwarding()
|
||||
systemProperty("kotlin.wasm.test.root.out.dir", "$buildDir/")
|
||||
fun Project.wasmProjectTest(
|
||||
taskName: String,
|
||||
body: Test.() -> Unit = {}
|
||||
): TaskProvider<Test> {
|
||||
return projectTest(
|
||||
taskName = taskName,
|
||||
parallel = true,
|
||||
jUnitMode = JUnitMode.JUnit5
|
||||
) {
|
||||
workingDir = rootDir
|
||||
setupV8()
|
||||
setupSpiderMonkey()
|
||||
useJUnitPlatform()
|
||||
setupWasmStdlib()
|
||||
setupGradlePropertiesForwarding()
|
||||
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