Debugger: compile TINY_APP in test once

This commit is contained in:
Natalia Ukhorskaya
2014-04-09 16:32:12 +04:00
parent 70ade1e931
commit b9ed52e630
2 changed files with 8 additions and 13 deletions
+1
View File
@@ -12,3 +12,4 @@ pluginPublisher/plugin-verifier.jar
tmp
workspace.xml
*.versionsBackup
idea/testData/debugger/tinyApp/classes*
@@ -47,8 +47,7 @@ import java.io.File;
public abstract class KotlinDebuggerTestCase extends DebuggerTestCase {
protected static final String TINY_APP = PluginTestCaseBase.getTestDataPathBase() + "/debugger/tinyApp";
private File outputDir;
private static boolean IS_TINY_APP_COMPILED = false;
@Override
protected OutputChecker initOutputChecker() {
@@ -87,19 +86,14 @@ public abstract class KotlinDebuggerTestCase extends DebuggerTestCase {
}
@Override
public void tearDown() throws Exception {
super.tearDown();
if (outputDir != null && outputDir.exists()) {
FileUtil.delete(outputDir);
}
}
@Override
protected void ensureCompiledAppExists() throws Exception {
String modulePath = getTestAppPath();
outputDir = new File(modulePath + File.separator + "classes");
MockLibraryUtil.compileKotlin(modulePath + File.separator + "src", outputDir);
if (!IS_TINY_APP_COMPILED) {
String modulePath = getTestAppPath();
MockLibraryUtil.compileKotlin(modulePath + File.separator + "src", new File(modulePath + File.separator + "classes"));
//noinspection AssignmentToStaticFieldFromInstanceMethod
IS_TINY_APP_COMPILED = true;
}
}
private static class KotlinOutputChecker extends OutputChecker {