]> source.dussan.org Git - aspectj.git/commitdiff
make tests tidy up after themselves
authorAndy Clement <aclement@gopivotal.com>
Tue, 21 Oct 2014 21:00:12 +0000 (14:00 -0700)
committerAndy Clement <aclement@gopivotal.com>
Tue, 21 Oct 2014 21:00:12 +0000 (14:00 -0700)
tests/bugs/serialVersionUID/Util.java
tests/src/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java

index ec98bd149575c586b484a1395491ab9d08c55c00..5de6964459187589e419fc407f52080761a46170 100644 (file)
@@ -61,6 +61,7 @@ public class Util {
 
                if (command.equals("-read")) {
                        Object obj = read(name);
+                       try {new File(name).delete();} catch (IOException ioe) {}
                }
                else if (command.equals("-fail")) {
                        fail(name);
index 97bad4b22898729c14ae2a0e6dcb2b4dfa6781e0..78d671946adac81bb44e87b0557350a10e1de371 100644 (file)
@@ -15,6 +15,8 @@ import java.util.ArrayList;
 import java.util.Hashtable;
 import java.util.List;
 
+import org.aspectj.util.FileUtil;
+
 public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAjdeInteractionTestbed {
        
        
@@ -23,8 +25,14 @@ public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAj
                super.tearDown();
                new File("Advise_aaa.java").delete();
                new File("Advise_ccc.java").delete();
+               new File("Advise_boo.java").delete();
+               new File("Advise_too.java").delete();
                new File("AroundAdvise_aaa.java").delete();
                new File("AroundAdvise_ccc.java").delete();
+               if (new File("../run-all-junit-tests/generated/test/SomeCallbacks.java").exists()) {
+                       FileUtil.deleteContents(new File("../run-all-junit-tests/generated"));
+                       new File("../run-all-junit-tests/generated").delete();
+               }
        }
        
        // Basic test: turns on annotation processing and tries to run the DemoProcessor