junit tests: keep output directories
authorAnna.Kozlova <anna.kozlova@jetbrains.com>
Tue, 8 Aug 2017 17:04:18 +0000 (19:04 +0200)
committerAnna.Kozlova <anna.kozlova@jetbrains.com>
Tue, 8 Aug 2017 18:03:47 +0000 (20:03 +0200)
java/java-tests/testData/junit/configurations/outputs/general 1/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/general 2/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/general 3/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/general 4/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/tests1/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/tests2/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/tests3/keep.dir [new file with mode: 0644]
java/java-tests/testData/junit/configurations/outputs/tests4/keep.dir [new file with mode: 0644]
java/java-tests/testSrc/com/intellij/java/execution/ConfigurationsTest.java

diff --git a/java/java-tests/testData/junit/configurations/outputs/general 1/keep.dir b/java/java-tests/testData/junit/configurations/outputs/general 1/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/general 2/keep.dir b/java/java-tests/testData/junit/configurations/outputs/general 2/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/general 3/keep.dir b/java/java-tests/testData/junit/configurations/outputs/general 3/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/general 4/keep.dir b/java/java-tests/testData/junit/configurations/outputs/general 4/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/tests1/keep.dir b/java/java-tests/testData/junit/configurations/outputs/tests1/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/tests2/keep.dir b/java/java-tests/testData/junit/configurations/outputs/tests2/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/tests3/keep.dir b/java/java-tests/testData/junit/configurations/outputs/tests3/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/java/java-tests/testData/junit/configurations/outputs/tests4/keep.dir b/java/java-tests/testData/junit/configurations/outputs/tests4/keep.dir
new file mode 100644 (file)
index 0000000..e69de29
index 801f15f94e3ba5fdc843e69ba1e6a268abfe8b13..a26edd51b04be7b21d0fb3e1e00c94f997aad655 100644 (file)
@@ -459,8 +459,10 @@ public class ConfigurationsTest extends BaseConfigurationTestCase {
     Disposer.register(getTestRootDisposable(), new Disposable() {
       @Override
       public void dispose() {
-        FileUtil.delete(new File(outputs[0]));
-        FileUtil.delete(new File(outputs[1]));
+        for (File file : new File(outputs[1]).listFiles()) {
+          if (file.getName().equals("keep.dir")) continue;
+          FileUtil.delete(file);
+        }
       }
     });
     return outputs;
@@ -480,7 +482,7 @@ public class ConfigurationsTest extends BaseConfigurationTestCase {
       try {
         CompilerTester tester = new CompilerTester(project, Arrays.asList(ModuleManager.getInstance(project).getModules()));
         try {
-          tester.rebuild();
+          tester.make();
           task.startSearch();
         }
         finally {