CompilerDependencies

Holds reference to runtime.jar and jdk-headers.jar. Paths to these
jars are no longer hardcoded.

Many tests now compile runtime before execution. Because of this:
* Single test invocation is significantly slower now for some tests
* This can be fixed by making tests independent from runtime (this
must be done anyway)

Some tests still depend on runtime.jar built by "ant dist", this
is to be fixed.
This commit is contained in:
Stepan Koltsov
2012-04-09 03:04:50 +04:00
parent aae7ba734d
commit 10dd366216
48 changed files with 422 additions and 128 deletions
@@ -33,6 +33,7 @@ import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BindingTrace;
import org.jetbrains.jet.lang.resolve.java.AnalyzeExhaust;
import org.jetbrains.jet.lang.resolve.java.AnalyzerFacadeForJVM;
import org.jetbrains.jet.lang.resolve.java.CompilerSpecialMode;
import org.jetbrains.jet.util.slicedmap.ReadOnlySlice;
import org.jetbrains.jet.util.slicedmap.SlicedMap;
import org.jetbrains.jet.util.slicedmap.WritableSlice;
@@ -158,12 +159,13 @@ public class JetTestUtils {
};
public static AnalyzeExhaust analyzeFile(@NotNull JetFile namespace, @NotNull JetControlFlowDataTraceFactory flowDataTraceFactory) {
return AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegration(namespace, flowDataTraceFactory);
return AnalyzerFacadeForJVM.analyzeOneFileWithJavaIntegration(namespace, flowDataTraceFactory,
CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR));
}
public static JetCoreEnvironment createEnvironmentWithMockJdk(Disposable disposable) {
JetCoreEnvironment environment = new JetCoreEnvironment(disposable, true);
JetCoreEnvironment environment = new JetCoreEnvironment(disposable, CompileCompilerDependenciesTest.compilerDependenciesForTests(CompilerSpecialMode.REGULAR));
final File rtJar = new File(JetTestCaseBuilder.getHomeDirectory(), "compiler/testData/mockJDK-1.7/jre/lib/rt.jar");
environment.addToClasspath(rtJar);
environment.addToClasspath(getAnnotationsJar());