From 54ff2a442fbd2b3574e4547154b6b67644214d4a Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Tue, 21 Oct 2014 14:00:12 -0700 Subject: [PATCH] make tests tidy up after themselves --- tests/bugs/serialVersionUID/Util.java | 1 + .../incremental/tools/AnnotationProcessingTests.java | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/tests/bugs/serialVersionUID/Util.java b/tests/bugs/serialVersionUID/Util.java index ec98bd149..5de696445 100644 --- a/tests/bugs/serialVersionUID/Util.java +++ b/tests/bugs/serialVersionUID/Util.java @@ -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); diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java index 97bad4b22..78d671946 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java @@ -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 -- 2.39.5