Fix 182 bunch tests, do not perform task tests on older platform versions
This commit is contained in:
+6
-8
@@ -383,19 +383,17 @@ class NewMultiplatformProjectImportingTest : MultiplePluginVersionGradleImportin
|
||||
}
|
||||
}
|
||||
|
||||
fun findTasksToRun(file: VirtualFile): List<String> {
|
||||
return GradleTestRunConfigurationProducer.findAllTestsTaskToRun(file, myProject)
|
||||
.flatMap { it.tasks }
|
||||
.sorted()
|
||||
}
|
||||
|
||||
val commonTestFile = files.find { it.path.contains("commonTest") }!!
|
||||
val commonTasks = findTasksToRun(commonTestFile)
|
||||
assertEquals(listOf(":cleanJvmTest", ":jvmTest"), commonTasks)
|
||||
if (commonTasks != null) {
|
||||
assertEquals(listOf(":cleanJvmTest", ":jvmTest"), commonTasks)
|
||||
}
|
||||
|
||||
val jvmTestFile = files.find { it.path.contains("jvmTest") }!!
|
||||
val jvmTasks = findTasksToRun(jvmTestFile)
|
||||
assertEquals(listOf(":cleanJvmTest", ":jvmTest"), jvmTasks)
|
||||
if (jvmTasks != null) {
|
||||
assertEquals(listOf(":cleanJvmTest", ":jvmTest"), jvmTasks)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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 com.intellij.openapi.vfs.VirtualFile
|
||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||
import org.jetbrains.plugins.gradle.execution.test.runner.GradleTestRunConfigurationProducer
|
||||
|
||||
fun MultiplePluginVersionGradleImportingTestCase.findTasksToRun(file: VirtualFile): List<String>? {
|
||||
return GradleTestRunConfigurationProducer.findAllTestsTaskToRun(file, project)
|
||||
.flatMap { it.tasks }
|
||||
.sorted()
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* 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 com.intellij.openapi.vfs.VirtualFile
|
||||
import org.jetbrains.kotlin.idea.codeInsight.gradle.MultiplePluginVersionGradleImportingTestCase
|
||||
|
||||
fun MultiplePluginVersionGradleImportingTestCase.findTasksToRun(file: VirtualFile): List<String>? {
|
||||
return null
|
||||
}
|
||||
+3
@@ -9,11 +9,14 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.idea.codeInsight.gradle
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
import org.junit.runners.Parameterized
|
||||
import java.util.*
|
||||
|
||||
abstract class MultiplePluginVersionGradleImportingTestCase : GradleImportingTestCase() {
|
||||
val project: Project
|
||||
get() = myProject
|
||||
|
||||
@JvmField
|
||||
@Parameterized.Parameter(1)
|
||||
|
||||
Reference in New Issue
Block a user