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.CommonLibraryKind
import org.jetbrains.kotlin.idea.framework.JSLibraryKind import org.jetbrains.kotlin.idea.framework.JSLibraryKind
import org.jetbrains.kotlin.idea.framework.KotlinSdkType 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.allModules
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
import org.jetbrains.kotlin.js.resolve.JsPlatform import org.jetbrains.kotlin.js.resolve.JsPlatform
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
import org.jetbrains.kotlin.platform.impl.isCommon import org.jetbrains.kotlin.platform.impl.isCommon
@@ -552,8 +552,7 @@ compileTestKotlin {
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType) Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
assertAllModulesConfigured() assertAllModulesConfigured()
} }
@@ -1217,7 +1216,7 @@ compileTestKotlin {
val stdlib = rootManager val stdlib = rootManager
.orderEntries .orderEntries
.filterIsInstance<LibraryOrderEntry>() .filterIsInstance<LibraryOrderEntry>()
.first { it.libraryName?.startsWith("Gradle: kotlin-stdlib-js-") ?: false } .first { it.libraryName?.startsWith("kotlin-stdlib-js-") ?: false }
.library!! .library!!
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
@@ -1897,22 +1896,11 @@ compileTestKotlin {
Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination) Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
} }
with(facetSettings("project_test")) { val rootManager = ModuleRootManager.getInstance(getModule("project"))
Assert.assertEquals("1.1", languageLevel!!.versionString) val libraries = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>()
Assert.assertEquals("1.0", apiLevel!!.versionString) assertTrue(libraries.all { (it.library as LibraryEx).effectiveKind(myProject) == CommonLibraryKind })
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_main")) Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
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)
} }
@Test @Test
@@ -2021,7 +2009,7 @@ compileTestKotlin {
Assert.assertEquals( Assert.assertEquals(
"-version", "-version",
testFacetSettings.compilerSettings!!.additionalArguments facetSettings.compilerSettings!!.additionalArguments
) )
assertAllModulesConfigured() 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.CommonLibraryKind
import org.jetbrains.kotlin.idea.framework.JSLibraryKind import org.jetbrains.kotlin.idea.framework.JSLibraryKind
import org.jetbrains.kotlin.idea.framework.KotlinSdkType 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.allModules
import org.jetbrains.kotlin.idea.util.projectStructure.sdk
import org.jetbrains.kotlin.js.resolve.JsPlatform import org.jetbrains.kotlin.js.resolve.JsPlatform
import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind
import org.jetbrains.kotlin.platform.impl.isCommon import org.jetbrains.kotlin.platform.impl.isCommon
@@ -552,8 +552,7 @@ compileTestKotlin {
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_main")).sdk!!.sdkType is KotlinSdkType) Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
Assert.assertTrue(ModuleRootManager.getInstance(getModule("project_test")).sdk!!.sdkType is KotlinSdkType)
assertAllModulesConfigured() assertAllModulesConfigured()
} }
@@ -1897,22 +1896,11 @@ compileTestKotlin {
Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination) Assert.assertEquals("my/destination", (compilerArguments as K2MetadataCompilerArguments).destination)
} }
with(facetSettings("project_test")) { val rootManager = ModuleRootManager.getInstance(getModule("project"))
Assert.assertEquals("1.1", languageLevel!!.versionString) val libraries = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>()
Assert.assertEquals("1.0", apiLevel!!.versionString) assertTrue(libraries.all { (it.library as LibraryEx).effectiveKind(myProject) == CommonLibraryKind })
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_main")) Assert.assertTrue(ModuleRootManager.getInstance(getModule("project")).sdk!!.sdkType is KotlinSdkType)
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)
} }
@Test @Test
@@ -2021,7 +2009,7 @@ compileTestKotlin {
Assert.assertEquals( Assert.assertEquals(
"-version", "-version",
testFacetSettings.compilerSettings!!.additionalArguments facetSettings.compilerSettings!!.additionalArguments
) )
assertAllModulesConfigured() assertAllModulesConfigured()