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:
Andrey Breslav
2012-04-27 22:01:58 +04:00
parent 3ee8c5e469
commit d72c655bd7
3 changed files with 4 additions and 2 deletions
@@ -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;