Misc: Disable some tests for recent Gradle versions

Old-style MPP doesn't work there due to ExternalProject not being built
This commit is contained in:
Alexey Sedunov
2018-10-10 18:11:40 +03:00
parent 061aa63a73
commit 7553fd2766
3 changed files with 2539 additions and 39 deletions
@@ -41,8 +41,8 @@ import org.jetbrains.kotlin.idea.facet.KotlinFacet
import org.jetbrains.kotlin.idea.framework.CommonLibraryKind
import org.jetbrains.kotlin.idea.framework.JSLibraryKind
import org.jetbrains.kotlin.idea.framework.KotlinSdkType
import org.jetbrains.kotlin.idea.framework.effectiveKind
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
import org.jetbrains.kotlin.js.resolve.JsPlatform
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
import org.jetbrains.kotlin.platform.impl.isCommon
@@ -552,8 +552,7 @@ compileTestKotlin {
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
assertAllModulesConfigured()
}
@@ -1217,7 +1216,7 @@ compileTestKotlin {
val stdlib = rootManager
.orderEntries
.filterIsInstance<LibraryOrderEntry>()
.first { it.libraryName?.startsWith("Gradle: kotlin-stdlib-js-") ?: false }
.first { it.libraryName?.startsWith("kotlin-stdlib-js-") ?: false }
.library!!
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
@@ -1897,22 +1896,11 @@ compileTestKotlin {
Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
}
with(facetSettings("project_test")) {
Assert.assertEquals("1.1", languageLevel!!.versionString)
Assert.assertEquals("1.0", apiLevel!!.versionString)
Assert.assertFalse(compilerArguments!!.autoAdvanceLanguageVersion)
Assert.assertFalse(compilerArguments!!.autoAdvanceApiVersion)
Assert.assertTrue(platform.isCommon)
Assert.assertEquals("my/test/classpath", (compilerArguments as K2MetadataCompilerArguments).classpath)
Assert.assertEquals("my/test/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
}
val rootManager = ModuleRootManager.getInstance(getModule("project"))
val libraries = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>()
assertTrue(libraries.all { (it.library as LibraryEx).effectiveKind(myProject) == CommonLibraryKind })
val rootManager = ModuleRootManager.getInstance(getModule("project_main"))
val stdlib = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>().single().library
assertEquals(CommonLibraryKind, (stdlib as LibraryEx).kind)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
}
@Test
@@ -2021,7 +2009,7 @@ compileTestKotlin {
Assert.assertEquals(
"-version",
testFacetSettings.compilerSettings!!.additionalArguments
facetSettings.compilerSettings!!.additionalArguments
)
assertAllModulesConfigured()
@@ -41,8 +41,8 @@ import org.jetbrains.kotlin.idea.facet.KotlinFacet
import org.jetbrains.kotlin.idea.framework.CommonLibraryKind
import org.jetbrains.kotlin.idea.framework.JSLibraryKind
import org.jetbrains.kotlin.idea.framework.KotlinSdkType
import org.jetbrains.kotlin.idea.framework.effectiveKind
import org.jetbrains.kotlin.idea.util.projectStructure.allModules
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
import org.jetbrains.kotlin.js.resolve.JsPlatform
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
import org.jetbrains.kotlin.platform.impl.isCommon
@@ -552,8 +552,7 @@ compileTestKotlin {
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
assertAllModulesConfigured()
}
@@ -1897,22 +1896,11 @@ compileTestKotlin {
Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
}
with(facetSettings("project_test")) {
Assert.assertEquals("1.1", languageLevel!!.versionString)
Assert.assertEquals("1.0", apiLevel!!.versionString)
Assert.assertFalse(compilerArguments!!.autoAdvanceLanguageVersion)
Assert.assertFalse(compilerArguments!!.autoAdvanceApiVersion)
Assert.assertTrue(platform.isCommon)
Assert.assertEquals("my/test/classpath", (compilerArguments as K2MetadataCompilerArguments).classpath)
Assert.assertEquals("my/test/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
}
val rootManager = ModuleRootManager.getInstance(getModule("project"))
val libraries = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>()
assertTrue(libraries.all { (it.library as LibraryEx).effectiveKind(myProject) == CommonLibraryKind })
val rootManager = ModuleRootManager.getInstance(getModule("project_main"))
val stdlib = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>().single().library
assertEquals(CommonLibraryKind, (stdlib as LibraryEx).kind)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
}
@Test
@@ -2021,7 +2009,7 @@ compileTestKotlin {
Assert.assertEquals(
"-version",
testFacetSettings.compilerSettings!!.additionalArguments
facetSettings.compilerSettings!!.additionalArguments
)
assertAllModulesConfigured()