From 30fc19ad82e1604fcb1d320e6d250a2e38bc5420 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Mon, 13 Feb 2012 18:38:41 +0400 Subject: [PATCH] ForTestCompileStdlib now is invoked in separate process to avoid substituting JarFileSystem and other global components with other incompatible components. --- .../org/jetbrains/jet/codegen/ForTestCompileStdlib.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/codegen/ForTestCompileStdlib.java b/compiler/tests/org/jetbrains/jet/codegen/ForTestCompileStdlib.java index ccdb111d320..8171c0c2657 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/ForTestCompileStdlib.java +++ b/compiler/tests/org/jetbrains/jet/codegen/ForTestCompileStdlib.java @@ -55,7 +55,7 @@ public class ForTestCompileStdlib { finally { stdlibJar.close(); } - + FileUtil.delete(classesDir); return jarFile; @@ -82,7 +82,12 @@ public class ForTestCompileStdlib { private static void compileKotlinPartOfStdlib(File destdir) throws IOException { // lame - KotlinCompiler.exec("-output", destdir.getPath(), "-src", "./stdlib/ktSrc"); + Process exec = Runtime.getRuntime().exec(new String[]{System.getProperty("java.home") + "/bin/java", "-cp", System.getProperty("java.class.path"), KotlinCompiler.class.getName(), "-output", destdir.getPath(), "-src", new File("./stdlib/ktSrc").getAbsolutePath()}); + try { + assert exec.waitFor() == 0; + } catch (InterruptedException e) { + throw new AssertionError(e); + } } private static List javaFilesInDir(File dir) {