From f49232cdf366c3983e25fc8135eee4638493a90a Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 10 Jul 2012 19:41:11 +0200 Subject: [PATCH] explain why tests fail for new checkout --- .../forTestCompile/ForTestPackJdkAnnotations.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestPackJdkAnnotations.java b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestPackJdkAnnotations.java index 95703cf44da..c883a864d77 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestPackJdkAnnotations.java +++ b/compiler/tests/org/jetbrains/jet/codegen/forTestCompile/ForTestPackJdkAnnotations.java @@ -16,8 +16,6 @@ package org.jetbrains.jet.codegen.forTestCompile; -import com.google.common.io.Files; -import com.intellij.openapi.util.Pair; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.JetTestUtils; @@ -25,8 +23,6 @@ import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import java.util.Stack; -import java.util.jar.JarEntry; import java.util.jar.JarOutputStream; /** @@ -67,6 +63,13 @@ public class ForTestPackJdkAnnotations { @NotNull public static File jdkAnnotationsForTests() { - return ForTestCompileSomething.ACTUALLY_COMPILE ? getJarFile() : new File("dist/kotlinc/lib/alt/kotlin-jdk-annotations.jar"); + if (ForTestCompileSomething.ACTUALLY_COMPILE) { + return getJarFile(); + } + final File jdkAnnotations = new File("dist/kotlinc/lib/alt/kotlin-jdk-annotations.jar"); + if (!jdkAnnotations.exists()) { + throw new RuntimeException("Kotlin JDK annotations jar not found; please run 'ant dist' to build it"); + } + return jdkAnnotations; } }