From a3a745e7a5b36b7aab00bdbf5c4fc0575d4c89f8 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 10 Mar 2021 14:23:29 +0100 Subject: [PATCH] Fix ParallelBuildTest for Windows Enclose file paths in raw strings. Otherwise in the string "C:\Users\...", "\U" was detected as an illegal escape which led to an error. --- .../org/jetbrains/kotlin/integration/ParallelBuildTest.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/kotlin/integration/ParallelBuildTest.kt b/compiler/tests/org/jetbrains/kotlin/integration/ParallelBuildTest.kt index 2294823db0f..41ab9e522e2 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/ParallelBuildTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/integration/ParallelBuildTest.kt @@ -15,6 +15,8 @@ import java.io.File class ParallelBuildTest : KotlinIntegrationTestBase() { fun testParallelBuild() { + fun rawString(text: String): String = "\"\"\"$text\"\"\"" + val testDataDir = KtTestUtil.getTestDataPathBase() + "/integration/smoke/helloApp" val programText = """ import org.jetbrains.kotlin.cli.common.messages.MessageRenderer @@ -36,8 +38,8 @@ class ParallelBuildTest : KotlinIntegrationTestBase() { try { val code = K2JVMCompiler().exec( System.err, MessageRenderer.PLAIN_RELATIVE_PATHS, - "$testDataDir/hello.kt", - "-d", "$tmpdir/output" + ${rawString("$testDataDir/hello.kt")}, + "-d", ${rawString("${tmpdir.path}/output")} ) if (code != ExitCode.OK) errors++ } catch (e: Throwable) {