From 868a8dbc84880b96b76f5d15ecb3afdafccd4c96 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Tue, 11 Nov 2014 20:36:46 +0300 Subject: [PATCH] Fixed paths unification in tests on some Windows machines. --- .../jetbrains/jet/jps/build/AbstractIncrementalJpsTest.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractIncrementalJpsTest.kt b/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractIncrementalJpsTest.kt index 01bc25a9408..f0bac02f486 100644 --- a/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractIncrementalJpsTest.kt +++ b/jps-plugin/test/org/jetbrains/jet/jps/build/AbstractIncrementalJpsTest.kt @@ -60,7 +60,8 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() { get() = false fun buildGetLog(scope: CompileScopeTestBuilder = CompileScopeTestBuilder.make().all()): String { - val logger = MyLogger(FileUtil.toSystemIndependentName(workDir.getAbsolutePath())) + val workDirPath = FileUtil.toSystemIndependentName(workDir.getAbsolutePath()) + val logger = MyLogger(workDirPath) val descriptor = createProjectDescriptor(BuildLoggingManager(logger)) try { val buildResult = doBuild(descriptor, scope)!! @@ -69,8 +70,9 @@ public abstract class AbstractIncrementalJpsTest : JpsBuildTestCase() { buildResult .getMessages(BuildMessage.Kind.ERROR) .joinToString("\n") - .replace(workDir.getAbsolutePath(), "\$PROJECT") .replace(File.separatorChar, '/') + .replace("/" + workDirPath, "\$PROJECT") // Sometimes path is rendered as "/C:/foo/bar" on Windows + .replace(workDirPath, "\$PROJECT") return logger.log + "$COMPILATION_FAILED\n" + errorMessages + "\n" } else {