[Gradle, JS] Fix cli tests for ir
KT-60495
This commit is contained in:
committed by
Space Team
parent
3b878336dd
commit
1f9af4b452
+8
-4
@@ -1,5 +1,9 @@
|
||||
$TEMP_DIR$
|
||||
-Xforce-deprecated-legacy-compiler-usage
|
||||
-no-stdlib
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
-Xir-only
|
||||
-Xir-produce-klib-dir
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
out
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xforce-deprecated-legacy-compiler-usage
|
||||
-kotlin-home
|
||||
$TESTDATA_DIR$
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
@@ -1,2 +0,0 @@
|
||||
warning: unable to find kotlin-stdlib-js.jar in the Kotlin home directory. Pass either '-no-stdlib' to prevent adding it to the classpath, or the correct '-kotlin-home'
|
||||
OK
|
||||
@@ -1,3 +0,0 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
@@ -1,2 +0,0 @@
|
||||
error: old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend
|
||||
COMPILATION_ERROR
|
||||
+8
-4
@@ -1,5 +1,9 @@
|
||||
not/existing/path
|
||||
-no-stdlib
|
||||
-Xforce-deprecated-legacy-compiler-usage
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
-Xir-only
|
||||
-Xir-produce-klib-dir
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
out
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
|
||||
+10
@@ -1,8 +1,18 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
$TESTDATA_DIR$/sourceMapCharEscape.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-embed-sources
|
||||
always
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/foo:$TESTDATA_DIR$/sourceMapDuplicatePath/bar
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
+10
@@ -1,8 +1,18 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
/localhost/src/
|
||||
|
||||
@@ -10,10 +10,20 @@ $TESTDATA_DIR$/sourceMapRelativeRoot/lib/out
|
||||
lib
|
||||
---
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/src/main.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$:$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
main
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$:$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-ir-output-dir
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/out
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$
|
||||
-ir-output-name
|
||||
out
|
||||
@@ -1,4 +0,0 @@
|
||||
info: produce executable: $TMP_DIR$
|
||||
info: cache directory: null
|
||||
info: executable production duration: [time]
|
||||
OK
|
||||
@@ -1,3 +0,0 @@
|
||||
// EXISTS: out.js
|
||||
// CONTAINS: out.js.map, "./foo/file1.kt"
|
||||
// CONTAINS: out.js.map, "./bar/file2.kt"
|
||||
@@ -1,9 +1,19 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/
|
||||
|
||||
@@ -2,10 +2,20 @@ $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/baz/file3.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/baz/file4.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo
|
||||
@@ -14,3 +24,4 @@ $TEMP_DIR$
|
||||
-ir-output-name
|
||||
out
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xir-produce-klib-dir
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-ir-output-dir
|
||||
$TEMP_DIR$/klib
|
||||
-ir-output-name
|
||||
out
|
||||
---
|
||||
-Xir-produce-js
|
||||
-Xir-only
|
||||
-libraries
|
||||
$STDLIB_JS$
|
||||
-Xinclude=$TEMP_DIR$/klib
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/foo:$TESTDATA_DIR$/bar
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xforce-deprecated-legacy-compiler-usage
|
||||
-no-stdlib
|
||||
-libraries
|
||||
$TESTDATA_DIR$/wrongAbiVersionLib/wrongAbiLib.meta.js
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
@@ -1,2 +0,0 @@
|
||||
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 +0,0 @@
|
||||
// ABSENT: out.js
|
||||
@@ -1 +0,0 @@
|
||||
// Kotlin.kotlin_module_metadata(0, "wrongAbiLib", "");
|
||||
@@ -70,6 +70,8 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
|
||||
int next = args.subList(index, args.size()).indexOf("---");
|
||||
if (next == -1) {
|
||||
next = args.size();
|
||||
} else {
|
||||
next = index + next;
|
||||
}
|
||||
Pair<String, ExitCode> pair = CompilerTestUtil.executeCompiler(compiler, args.subList(index, next));
|
||||
output.append(pair.getFirst());
|
||||
|
||||
@@ -1358,11 +1358,6 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
runTest("compiler/testData/cli/js/jsHelp.args");
|
||||
}
|
||||
|
||||
@TestMetadata("kotlinHomeWithoutStdlib.args")
|
||||
public void testKotlinHomeWithoutStdlib() throws Exception {
|
||||
runTest("compiler/testData/cli/js/kotlinHomeWithoutStdlib.args");
|
||||
}
|
||||
|
||||
@TestMetadata("kotlinPackage.args")
|
||||
public void testKotlinPackage() throws Exception {
|
||||
runTest("compiler/testData/cli/js/kotlinPackage.args");
|
||||
@@ -1373,11 +1368,6 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
runTest("compiler/testData/cli/js/languageVersion.args");
|
||||
}
|
||||
|
||||
@TestMetadata("legacyCompilerUsageWithoutFlag.args")
|
||||
public void testLegacyCompilerUsageWithoutFlag() throws Exception {
|
||||
runTest("compiler/testData/cli/js/legacyCompilerUsageWithoutFlag.args");
|
||||
}
|
||||
|
||||
@TestMetadata("libraryDirNotFound.args")
|
||||
public void testLibraryDirNotFound() throws Exception {
|
||||
runTest("compiler/testData/cli/js/libraryDirNotFound.args");
|
||||
@@ -1448,11 +1438,6 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
runTest("compiler/testData/cli/js/sourceMapRelativeRoot.args");
|
||||
}
|
||||
|
||||
@TestMetadata("sourceMapRootAuto.args")
|
||||
public void testSourceMapRootAuto() throws Exception {
|
||||
runTest("compiler/testData/cli/js/sourceMapRootAuto.args");
|
||||
}
|
||||
|
||||
@TestMetadata("sourceMapRootManual.args")
|
||||
public void testSourceMapRootManual() throws Exception {
|
||||
runTest("compiler/testData/cli/js/sourceMapRootManual.args");
|
||||
@@ -1487,11 +1472,6 @@ public class CliTestGenerated extends AbstractCliTest {
|
||||
public void testWithLib() throws Exception {
|
||||
runTest("compiler/testData/cli/js/withLib.args");
|
||||
}
|
||||
|
||||
@TestMetadata("wrongAbiVersion.args")
|
||||
public void testWrongAbiVersion() throws Exception {
|
||||
runTest("compiler/testData/cli/js/wrongAbiVersion.args");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/cli/js-dce")
|
||||
|
||||
Reference in New Issue
Block a user