Configure Java module path when compiler is invoked in -Xbuild-file mode

#KT-27626 Fixed
This commit is contained in:
Alexander Udalov
2018-10-17 13:08:25 +02:00
parent 1a1b7938fb
commit e3a332c393
7 changed files with 50 additions and 14 deletions
@@ -204,7 +204,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
String argWithTestPathsReplaced = replaceTestPaths(argWithColonsReplaced, testDataDir, tempDir);
if (arg.startsWith(BUILD_FILE_ARGUMENT_PREFIX)) {
return createTempFileWithPathsReplaced(argWithTestPathsReplaced, BUILD_FILE_ARGUMENT_PREFIX, ".xml", testDataDir, tempDir);
return replacePathsInBuildXml(argWithTestPathsReplaced, testDataDir, tempDir);
}
if (arg.startsWith(ARGFILE_ARGUMENT)) {
@@ -214,6 +214,11 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
return argWithTestPathsReplaced;
}
@NotNull
public static String replacePathsInBuildXml(@NotNull String argument, @NotNull String testDataDir, @NotNull String tempDir) {
return createTempFileWithPathsReplaced(argument, BUILD_FILE_ARGUMENT_PREFIX, ".xml", testDataDir, tempDir);
}
// Create new temporary file with all test paths replaced and return the new argument value with the new file path
@NotNull
private static String createTempFileWithPathsReplaced(