Skip to content

Commit 5cbfe24

Browse files
nav-navSpace Team
authored and
Space Team
committed
Fix unstable TryK2IT.smokeTestForNativeTasks test
fix test fails with unexpected task execution order cherry-picked from e4fc375
1 parent 9bf9cb4 commit 5cbfe24

File tree

2 files changed

+5
-5
lines changed
  • libraries/tools
    • kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/report
    • kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/experimental

2 files changed

+5
-5
lines changed

libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/experimental/TryK2IT.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ class TryK2IT : KGPBaseTest() {
8787
assertOutputContains(
8888
"""
8989
|##### 'kotlin.experimental.tryK2' results #####
90-
|:lib:compileKotlin: 2.0 language version
9190
|:app:compileKotlin: 2.0 language version
91+
|:lib:compileKotlin: 2.0 language version
9292
|##### 100% (2/2) tasks have been compiled with Kotlin 2.0 #####
9393
""".trimMargin().normalizeLineEndings()
9494
)
@@ -112,13 +112,13 @@ class TryK2IT : KGPBaseTest() {
112112
"""
113113
|##### 'kotlin.experimental.tryK2' results #####
114114
|:compileCommonMainKotlinMetadata: 2.0 language version
115-
|:compileNativeMainKotlinMetadata: 2.0 language version
116115
|:compileKotlinLinuxX64: 2.0 language version${
117116
if (HostManager.hostIsMac)
118117
"\n|:compileKotlinMacosArm64: 2.0 language version\n|:compileKotlinMacosX64: 2.0 language version"
119118
else ""
120119
}
121120
|:compileKotlinMingwX64: 2.0 language version
121+
|:compileNativeMainKotlinMetadata: 2.0 language version
122122
|##### 100% ${if (HostManager.hostIsMac) "(6/6)" else "(4/4)"} tasks have been compiled with Kotlin 2.0 #####
123123
""".trimMargin().normalizeLineEndings()
124124
)
@@ -148,8 +148,8 @@ class TryK2IT : KGPBaseTest() {
148148
assertOutputContains(
149149
"""
150150
|##### 'kotlin.experimental.tryK2' results #####
151-
|:lib:compileKotlin: 2.0 language version
152151
|:app:compileKotlin: 2.0 language version
152+
|:lib:compileKotlin: 2.0 language version
153153
|##### 100% (2/2) tasks have been compiled with Kotlin 2.0 #####
154154
""".trimMargin().normalizeLineEndings()
155155
)
@@ -294,8 +294,8 @@ class TryK2IT : KGPBaseTest() {
294294
|##### 'kotlin.experimental.tryK2' results #####
295295
|:compileKotlinJs: 2.0 language version
296296
|:compileProductionExecutableKotlinJs: 2.0 language version
297-
|:compileTestKotlinJs: 2.0 language version
298297
|:compileTestDevelopmentExecutableKotlinJs: 2.0 language version
298+
|:compileTestKotlinJs: 2.0 language version
299299
|##### 100% (4/4) tasks have been compiled with Kotlin 2.0 #####
300300
""".trimMargin().normalizeLineEndings()
301301
)

libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/report/BuildReportsService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ class BuildReportsService {
280280
}
281281
val taskWithK2Percent = (tasksCountWithKotlin2 * 100) / tasksData.count()
282282
val statsData = tasksData.map { it.path to it.kotlinLanguageVersion?.version }
283-
statsData.forEach { record ->
283+
statsData.sortedBy { it.first }.forEach { record ->
284284
log.warn("${record.first}: ${record.second} language version")
285285
}
286286
log.warn(

0 commit comments

Comments
 (0)