[Gradle] Update ConfigurationCacheIT tests after supporting GCC for HMPP
^KT-49933
This commit is contained in:
committed by
Space Team
parent
1f895e5a36
commit
02e97dcbc1
+1
-1
@@ -101,6 +101,7 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
":lib:assembleLibDebugXCFramework",
|
||||
":lib:compileTestKotlinIosX64",
|
||||
":lib:linkDebugTestIosX64",
|
||||
":lib:transformCommonMainDependenciesMetadata",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -111,7 +112,6 @@ class ConfigurationCacheIT : AbstractConfigurationCacheIT() {
|
||||
buildOptions = defaultBuildOptions.copy(
|
||||
freeArgs = listOf(
|
||||
// remove after KT-49933 is fixed
|
||||
"-x", ":lib:transformCommonMainDependenciesMetadata",
|
||||
"-x", ":lib:transformCommonMainCInteropDependenciesMetadata",
|
||||
)
|
||||
)
|
||||
|
||||
-53
@@ -910,59 +910,6 @@ class HierarchicalMppIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_4, maxVersion = TestVersions.Gradle.G_7_4)
|
||||
@DisplayName("KT-51946: Temporarily mark HMPP tasks as notCompatibleWithConfigurationCache for Gradle 7.4")
|
||||
fun testHmppTasksAreNotIncludedInGradleConfigurationCache(gradleVersion: GradleVersion, @TempDir tempDir: Path) {
|
||||
with(project("hmppGradleConfigurationCache", gradleVersion = gradleVersion, localRepoDir = tempDir)) {
|
||||
val options =
|
||||
buildOptions.copy(configurationCache = true, configurationCacheProblems = BaseGradleIT.ConfigurationCacheProblems.FAIL)
|
||||
|
||||
build(":lib:publish") {
|
||||
assertTasksExecuted(":lib:publish")
|
||||
}
|
||||
|
||||
val configCacheIncompatibleTasks = listOf(
|
||||
":lib:transformCommonMainDependenciesMetadata",
|
||||
)
|
||||
|
||||
build("clean", "assemble", buildOptions = options) {
|
||||
assertTasksExecuted(configCacheIncompatibleTasks)
|
||||
configCacheIncompatibleTasks.forEach { task ->
|
||||
assertOutputContains(
|
||||
"""Task `${task}` of type `.+`: .+(at execution time is unsupported|not supported with the configuration cache)"""
|
||||
.toRegex()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
build("clean", "assemble", buildOptions = options) {
|
||||
assertOutputContains("Configuration cache entry discarded")
|
||||
assertTasksExecuted(configCacheIncompatibleTasks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@GradleTestVersions(maxVersion = TestVersions.Gradle.G_7_3)
|
||||
@DisplayName("KT-51946: Print warning on tasks that are not compatible with configuration cache")
|
||||
fun testHmppTasksReportConfigurationCacheWarningForGradleLessThan74(gradleVersion: GradleVersion, @TempDir tempDir: Path) {
|
||||
with(project("hmppGradleConfigurationCache", gradleVersion = gradleVersion, localRepoDir = tempDir)) {
|
||||
build(":lib:publish")
|
||||
|
||||
// Assert that no warnings are shown when configuration-cache is not enabled
|
||||
build("clean", "assemble") {
|
||||
assertOutputDoesNotContain("""Task \S+ is not compatible with configuration cache""".toRegex())
|
||||
}
|
||||
|
||||
val options =
|
||||
buildOptions.copy(configurationCache = true, configurationCacheProblems = BaseGradleIT.ConfigurationCacheProblems.FAIL)
|
||||
buildAndFail("clean", "assemble", buildOptions = options) {
|
||||
assertOutputContains("""Task \S+ is not compatible with configuration cache""".toRegex())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@GradleTest
|
||||
@DisplayName("KT-52216: [TYPE_MISMATCH] Caused by unexpected metadata dependencies of leaf source sets")
|
||||
fun `test default platform compilation source set has no metadata dependencies`(gradleVersion: GradleVersion) {
|
||||
|
||||
Reference in New Issue
Block a user