Minor, expand TESTDATA_DIR with absolute path in CLI tests
To be able to use it correctly inside an xml build file where, if the path is not absolute, it's treated as relative to the build file path (which is TMP_DIR in several tests of the subsequent commit)
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
error: at compiler/testData/cli/js-dce/parseError.js (1, 1): syntax error
|
||||
error: at $TESTDATA_DIR$/parseError.js (1, 1): syntax error
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
error: cannot open output file 'compiler/testData/cli/js': is a directory
|
||||
error: cannot open output file '$TESTDATA_DIR$': is a directory
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
error: file 'compiler/testData/cli/js/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 0.0.0, expected version is $ABI_VERSION$
|
||||
error: file '$TESTDATA_DIR$/wrongAbiVersionLib/wrongAbiLib.meta.js' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 0.0.0, expected version is $ABI_VERSION$
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
warning: duplicate source root: compiler/testData/cli/jvm/simple.kt
|
||||
warning: duplicate source root: $TESTDATA_DIR$/simple.kt
|
||||
OK
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
error: JDK home directory does not exist: compiler/testData/cli/jvm/abacaba
|
||||
error: JDK home directory does not exist: $TESTDATA_DIR$/abacaba
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
error: no class roots are found in the JDK path: compiler/testData/cli/jvm
|
||||
error: no class roots are found in the JDK path: $TESTDATA_DIR$
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -185,7 +185,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
|
||||
private static List<String> readArgs(@NotNull String testArgsFilePath, @NotNull String tempDir) {
|
||||
File testArgsFile = new File(testArgsFilePath);
|
||||
List<String> lines = FilesKt.readLines(testArgsFile, Charsets.UTF_8);
|
||||
return CollectionsKt.mapNotNull(lines, arg -> readArg(arg, testArgsFile.getParent(), tempDir));
|
||||
return CollectionsKt.mapNotNull(lines, arg -> readArg(arg, testArgsFile.getParentFile().getAbsolutePath(), tempDir));
|
||||
}
|
||||
|
||||
private static String readArg(String arg, @NotNull String testDataDir, @NotNull String tempDir) {
|
||||
|
||||
Reference in New Issue
Block a user