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:
-71
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
-38
@@ -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()
|
||||
}
|
||||
-9
@@ -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)
|
||||
|
||||
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user