Remove WorkersIT test.

Now all compilations are using workers and issues should be covered
by other tests.

^KT-46406 Fixed
This commit is contained in:
Yahor Berdnikau
2021-09-16 10:57:31 +02:00
committed by Space
parent 3dc69495f9
commit e4827efb4a
4 changed files with 0 additions and 126 deletions
@@ -1,71 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.gradle
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
import org.junit.Test
class WorkersIT : BaseGradleIT() {
@Test
fun testParallelTasks() {
parallelTasksImpl(
isParallel = true,
jsCompilerType = KotlinJsCompilerType.LEGACY
)
}
@Test
fun testParallelTasksJsIr() {
parallelTasksImpl(
isParallel = true,
jsCompilerType = KotlinJsCompilerType.IR
)
}
@Test
fun testNoParallelTasks() {
parallelTasksImpl(
isParallel = false,
jsCompilerType = KotlinJsCompilerType.LEGACY
)
}
@Test
fun testNoParallelTasksJsIr() {
parallelTasksImpl(
isParallel = false,
jsCompilerType = KotlinJsCompilerType.IR
)
}
private fun parallelTasksImpl(
isParallel: Boolean,
jsCompilerType: KotlinJsCompilerType
) =
with(Project("new-mpp-parallel", GradleVersionRequired.FOR_MPP_SUPPORT)) {
val options = defaultBuildOptions().copy(
parallelTasksInProject = isParallel,
withDaemon = false,
jsCompilerType = jsCompilerType
)
val traceLoading = "-Dorg.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.trace.loading=true"
build("assemble", traceLoading, options = options) {
assertSuccessful()
val tasks = arrayOf(":compileKotlinMetadata", ":compileKotlinJvm", ":compileKotlinJs")
assertTasksSubmittedWork(*tasks)
val expectedKotlinOutputFiles = listOf(
kotlinClassesDir(sourceSet = "metadata/main") + "common/A.kotlin_metadata",
kotlinClassesDir(sourceSet = "jvm/main") + "common/A.class",
kotlinClassesDir(sourceSet = "js/main") +
if (jsCompilerType == KotlinJsCompilerType.IR) "default/manifest" else "new-mpp-parallel.js"
)
expectedKotlinOutputFiles.forEach { assertFileExists(it) }
assertSubstringCount("Loaded GradleKotlinCompilerWork", 1)
assertCompiledKotlinSources(project.relativize(project.allKotlinFiles))
assertNotContains("Falling back to sl4j logger")
}
}
}
@@ -1,38 +0,0 @@
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'kotlin-multiplatform'
repositories {
mavenLocal()
mavenCentral()
}
kotlin {
sourceSets {
commonMain {}
jvmMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}
}
}
targets {
fromPreset(presets.jvm, 'jvm')
}
js()
}
@@ -1,9 +0,0 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package common
class A(val x: Int)
@@ -86,14 +86,6 @@ internal class GradleKotlinCompilerWork @Inject constructor(
config: GradleKotlinCompilerWorkArguments
) : Runnable {
companion object {
init {
if (System.getProperty("org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.trace.loading") == "true") {
println("Loaded GradleKotlinCompilerWork")
}
}
}
private val projectRootFile = config.projectFiles.projectRootFile
private val clientIsAliveFlagFile = config.projectFiles.clientIsAliveFlagFile
private val sessionFlagFile = config.projectFiles.sessionFlagFile