fail properly if stdlib compilation failed

This commit is contained in:
Stepan Koltsov
2012-03-19 23:25:18 +04:00
parent 2fd1fe78e5
commit 089820fb38
@@ -98,8 +98,10 @@ public class ForTestCompileStdlib {
} }
private static void compileKotlinPartOfStdlib(File destdir) throws IOException { private static void compileKotlinPartOfStdlib(File destdir) throws IOException {
// lame KotlinCompiler.ExitCode exitCode = new KotlinCompiler().exec(System.err, "-output", destdir.getPath(), "-src", "./libraries/stdlib/src", "-stdlib", destdir.getAbsolutePath());
new KotlinCompiler().exec(System.err, "-output", destdir.getPath(), "-src", "./libraries/stdlib/src", "-stdlib", destdir.getAbsolutePath()); if (exitCode != KotlinCompiler.ExitCode.OK) {
throw new IllegalStateException("stdlib for test compilation failed: " + exitCode);
}
} }
private static List<File> javaFilesInDir(File dir) { private static List<File> javaFilesInDir(File dir) {