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.
This commit is contained in:
committed by
Alexander Udalov
parent
5d0760c685
commit
a3a745e7a5
@@ -15,6 +15,8 @@ import java.io.File
|
|||||||
|
|
||||||
class ParallelBuildTest : KotlinIntegrationTestBase() {
|
class ParallelBuildTest : KotlinIntegrationTestBase() {
|
||||||
fun testParallelBuild() {
|
fun testParallelBuild() {
|
||||||
|
fun rawString(text: String): String = "\"\"\"$text\"\"\""
|
||||||
|
|
||||||
val testDataDir = KtTestUtil.getTestDataPathBase() + "/integration/smoke/helloApp"
|
val testDataDir = KtTestUtil.getTestDataPathBase() + "/integration/smoke/helloApp"
|
||||||
val programText = """
|
val programText = """
|
||||||
import org.jetbrains.kotlin.cli.common.messages.MessageRenderer
|
import org.jetbrains.kotlin.cli.common.messages.MessageRenderer
|
||||||
@@ -36,8 +38,8 @@ class ParallelBuildTest : KotlinIntegrationTestBase() {
|
|||||||
try {
|
try {
|
||||||
val code = K2JVMCompiler().exec(
|
val code = K2JVMCompiler().exec(
|
||||||
System.err, MessageRenderer.PLAIN_RELATIVE_PATHS,
|
System.err, MessageRenderer.PLAIN_RELATIVE_PATHS,
|
||||||
"$testDataDir/hello.kt",
|
${rawString("$testDataDir/hello.kt")},
|
||||||
"-d", "$tmpdir/output"
|
"-d", ${rawString("${tmpdir.path}/output")}
|
||||||
)
|
)
|
||||||
if (code != ExitCode.OK) errors++
|
if (code != ExitCode.OK) errors++
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
|||||||
Reference in New Issue
Block a user