Fixed paths unification in tests on some Windows machines.

This commit is contained in:
Evgeny Gerashchenko
2014-11-11 20:36:46 +03:00
parent b39d34ca8d
commit 868a8dbc84
@@ -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 {