move test output to one level down

for ReadClassDataTest and CompileJavaAgainstKotlinTest
This commit is contained in:
Stepan Koltsov
2011-12-30 00:05:25 +04:00
parent 02b2cc4fb8
commit 855142e35d
3 changed files with 7 additions and 2 deletions
@@ -53,7 +53,7 @@ public class CompileJavaAgainstKotlinTest extends UsefulTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
tmpdir = new File("tmp/" + this.getClass().getSimpleName() + "." + this.getName());
tmpdir = JetTestUtils.tmpDirForTest(this);
JetTestUtils.recreateDirectory(tmpdir);
}
@@ -2,6 +2,7 @@ package org.jetbrains.jet;
import com.google.common.collect.Lists;
import com.intellij.openapi.Disposable;
import junit.framework.TestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.diagnostics.Diagnostic;
@@ -166,6 +167,10 @@ public class JetTestUtils {
file.delete();
}
}
public static File tmpDirForTest(TestCase test) {
return new File("tmp/" + test.getClass().getSimpleName() + "/" + test.getName());
}
public static void recreateDirectory(File file) throws IOException {
rmrf(file);
@@ -62,7 +62,7 @@ public class ReadClassDataTest extends UsefulTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
tmpdir = new File("tmp/" + this.getClass().getSimpleName() + "." + this.getName());
tmpdir = JetTestUtils.tmpDirForTest(this);
JetTestUtils.recreateDirectory(tmpdir);
}