diff --git a/gradle/templates/template-app/src/commonTest/kotlin/HelloWorldKotest.kt b/gradle/templates/template-app/src/commonTest/kotlin/HelloWorldKotest.kt index 714df6c..eaf764c 100644 --- a/gradle/templates/template-app/src/commonTest/kotlin/HelloWorldKotest.kt +++ b/gradle/templates/template-app/src/commonTest/kotlin/HelloWorldKotest.kt @@ -9,6 +9,11 @@ class HelloWorldKotestTest : PreparedSpec({ @Suppress("SimplifyBooleanWithConstants") // The compiler knows this test will always succeed check("Hello World!" == message) } + + test("Yay • \u2606\u2606\u2606\u2606 Unicode!") { + // This test verifies that our CI is able to handle Unicode characters in test names. + // See https://gitlab.com/gitlab-org/gitlab/-/issues/580885 + } }) class FooTest : FunSpec({ diff --git a/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTest.kt b/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTest.kt deleted file mode 100644 index 23918b6..0000000 --- a/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTest.kt +++ /dev/null @@ -1,11 +0,0 @@ -package opensavvy.playground.core - -import opensavvy.prepared.runner.testballoon.preparedSuite - -val HelloWorldTest by preparedSuite { - - test("Hello world!") { - @Suppress("SimplifyBooleanWithConstants") // The compiler knows this test will always succeed - check("Hello World!" == message) - } -} diff --git a/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTestBalloonTest.kt b/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTestBalloonTest.kt new file mode 100644 index 0000000..e6a9052 --- /dev/null +++ b/gradle/templates/template-lib/src/commonTest/kotlin/HelloWorldTestBalloonTest.kt @@ -0,0 +1,18 @@ +package opensavvy.playground.core + +import opensavvy.prepared.runner.testballoon.preparedSuite + +val HelloWorldTestBalloonTest by preparedSuite { + + test("Hello world!") { + @Suppress("SimplifyBooleanWithConstants") // The compiler knows this test will always succeed + check("Hello World!" == message) + } + + suite("Nested suite with Unicode \u2606") { + test("Yay • \u2606\u2606\u2606\u2606 Unicode!") { + // This test verifies that our CI is able to handle Unicode characters in test names. + // See https://gitlab.com/gitlab-org/gitlab/-/issues/580885 + } + } +} -- 2.51.2 From 79dbdf5ff83ec689a15eb8c7c71d401359846104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=E2=80=9CCLOVIS=E2=80=9D=20Canet?= Date: Mon, 16 Feb 2026 15:27:20 +0100 Subject: [PATCH 2/2] ci(gitlab): Strip non-latin-1 characters from test report names on non-JVM platforms This is a workaround for https://gitlab.com/gitlab-org/gitlab/-/issues/580885. --- .gitlab-ci.main.kts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.gitlab-ci.main.kts b/.gitlab-ci.main.kts index b4874bf..f68ca4d 100755 --- a/.gitlab-ci.main.kts +++ b/.gitlab-ci.main.kts @@ -24,6 +24,33 @@ val siteUrl = "\$CI_PAGES_URL" fun Job.opensavvyImage(name: String) = image("registry.gitlab.com/opensavvy/automation/containers/$name", ciContainers) +// region GitLab + +/** + * Renames all JUnit XML test reports to remove non-latin-1 characters, because GitLab crashes in their presence. + * + * See [GITLAB-580885](https://gitlab.com/gitlab-org/gitlab/-/issues/580885). + */ +fun Job.stripUnicodeTestReports() { + afterScript { + // language="Shell Script" + shell($$""" + find . -path '*/build/test-results/*/TEST-*.xml' -print0 | + grep -zP '[^\x00-\x{00FF}]' | + while IFS= read -r -d '' f; do + d="$(dirname "$f")" + b="$(basename "$f")" + nb=$(printf '%s' "$b" | LC_ALL=C sed -E \ + -e 's/[\xc4-\xdf][\x80-\xbf]/-/g' \ + -e 's/[\xe0-\xef][\x80-\xbf]{2}/-/g' \ + -e 's/[\xf0-\xf4][\x80-\xbf]{3}/-/g') + mv -- "$f" "$d/$nb" + done + """.trimIndent()) + } +} + +// endregion // region Kotlin Multiplatform fun Job.jvm() { @@ -34,16 +61,22 @@ fun Job.jvm() { fun Job.jsBrowser() { useGradle() opensavvyImage("chromium") + + stripUnicodeTestReports() } fun Job.jsNode() { useGradle() opensavvyImage("nodejs") + + stripUnicodeTestReports() } fun Job.nativeLinuxX64() { useGradle() opensavvyImage("java") + + stripUnicodeTestReports() } fun Job.nativeIosArm64() {