From d72c655bd71dea39384bfa36041a914ab03f1f66 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 27 Apr 2012 22:01:58 +0400 Subject: [PATCH] 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!" --- .../jet/codegen/forTestCompile/ForTestCompileJdkHeaders.java | 2 +- .../jet/codegen/forTestCompile/ForTestCompileRuntime.java | 2 +- .../jet/codegen/forTestCompile/ForTestCompileSomething.java | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileJdkHeaders.java b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileJdkHeaders.java index 7603af9ee1a..b94fbbc14b5 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileJdkHeaders.java +++ b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileJdkHeaders.java @@ -50,6 +50,6 @@ public class ForTestCompileJdkHeaders { @NotNull 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"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileRuntime.java b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileRuntime.java index dc8cb3569fe..d7c8b703a9b 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileRuntime.java +++ b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileRuntime.java @@ -113,7 +113,7 @@ public class ForTestCompileRuntime { @NotNull public static File runtimeJarForTests() { - return Runtime.runtime.getJarFile(); + return ForTestCompileSomething.ACTUALLY_COMPILE ? Runtime.runtime.getJarFile() : new File("dist/kotlinc/lib/kotlin-runtime.jar"); } } diff --git a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java index c6d09a81878..e9accd9cd59 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java +++ b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestCompileSomething.java @@ -36,6 +36,8 @@ import java.util.jar.JarOutputStream; */ abstract class ForTestCompileSomething { + public static final boolean ACTUALLY_COMPILE = "true".equals(System.getenv("kotlin.tests.actually.compile")); + @NotNull private final String jarName; private Throwable error;