Option added: switch off compilation of stdlib and jdk-headers
To achieve the desired result, in your run configuration add an environment variable named kotlin.tests.actually.compile and set it to "NO!"
This commit is contained in:
+1
-1
@@ -50,6 +50,6 @@ public class ForTestCompileJdkHeaders {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static File jdkHeadersForTests() {
|
public static File jdkHeadersForTests() {
|
||||||
return JdkHeaders.jdkHeaders.getJarFile();
|
return ForTestCompileSomething.ACTUALLY_COMPILE ? JdkHeaders.jdkHeaders.getJarFile() : new File("dist/kotlinc/lib/alt/kotlin-jdk-headers.jar");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class ForTestCompileRuntime {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static File runtimeJarForTests() {
|
public static File runtimeJarForTests() {
|
||||||
return Runtime.runtime.getJarFile();
|
return ForTestCompileSomething.ACTUALLY_COMPILE ? Runtime.runtime.getJarFile() : new File("dist/kotlinc/lib/kotlin-runtime.jar");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import java.util.jar.JarOutputStream;
|
|||||||
*/
|
*/
|
||||||
abstract class ForTestCompileSomething {
|
abstract class ForTestCompileSomething {
|
||||||
|
|
||||||
|
public static final boolean ACTUALLY_COMPILE = "true".equals(System.getenv("kotlin.tests.actually.compile"));
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private final String jarName;
|
private final String jarName;
|
||||||
private Throwable error;
|
private Throwable error;
|
||||||
|
|||||||
Reference in New Issue
Block a user