aboutsummaryrefslogtreecommitdiffstats
path: root/testing-drivers
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-07 06:04:10 +0000
committerwisberg <wisberg>2003-05-07 06:04:10 +0000
commit8bac6711e5a9649b4f4810459c44a057b26dca6e (patch)
treeef965667b645566ccfb0b6e8583d7874c6dc2b36 /testing-drivers
parente7a312263a14d8fe60b25c775174331b66431311 (diff)
downloadaspectj-8bac6711e5a9649b4f4810459c44a057b26dca6e.tar.gz
aspectj-8bac6711e5a9649b4f4810459c44a057b26dca6e.zip
-killTemp to delete temp directories when each test case completes
Diffstat (limited to 'testing-drivers')
-rw-r--r--testing-drivers/src/org/aspectj/testing/drivers/Harness.java15
-rw-r--r--testing-drivers/src/org/aspectj/testing/drivers/package.html8
2 files changed, 20 insertions, 3 deletions
diff --git a/testing-drivers/src/org/aspectj/testing/drivers/Harness.java b/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
index 0cca13df5..b9b540cba 100644
--- a/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
+++ b/testing-drivers/src/org/aspectj/testing/drivers/Harness.java
@@ -170,9 +170,12 @@ public class Harness {
/** map of feature names to features */
private HashMap features;
- /** if true, do not delete temporary files */
+ /** if true, do not delete temporary files. */
private boolean keepTemp;
+ /** if true, delete temporary files as each test completes. */
+ private boolean killTemp;
+
/** if true, then log results in report(..) when done */
private boolean logResults;
@@ -305,7 +308,9 @@ public class Harness {
status.setIdentifier(spec);
// validator is used for all setup in entire tree...
Validator validator = new Validator(status);
- validator.lock(this);
+ if (!killTemp) {
+ validator.lock(this);
+ }
Sandbox sandbox = null;
try {
sandbox = new Sandbox(spec.getSuiteDirFile(), validator);
@@ -315,8 +320,10 @@ public class Harness {
numIncomplete = ((RunSpecIterator) tests).getNumIncomplete();
}
} finally {
- validator.unlock(this);
if (!keepTemp) {
+ if (!killTemp) {
+ validator.unlock(this);
+ }
validator.deleteTempFiles(verboseHarness);
}
}
@@ -401,6 +408,8 @@ public class Harness {
quietHarness = true;
} else if ("-keepTemp".equals(option)) {
keepTemp = true;
+ } else if ("-killTemp".equals(option)) {
+ killTemp = true;
} else if ("-logResults".equals(option)) {
logResults = true;
} else {
diff --git a/testing-drivers/src/org/aspectj/testing/drivers/package.html b/testing-drivers/src/org/aspectj/testing/drivers/package.html
index 8c795bdd3..6c8a7ebf5 100644
--- a/testing-drivers/src/org/aspectj/testing/drivers/package.html
+++ b/testing-drivers/src/org/aspectj/testing/drivers/package.html
@@ -38,6 +38,14 @@ each component in the chain may accept and interpret:
<tr><td><u><code>-keepTemp</code></u>: Normally the harness saves temp files until
the end of the run, and deletes them. If you abort the run or specify
<code>-keepTemp</code>, then temporary (sandbox) directories will remain for analysis.
+ In either case, the file system accumulates all temporary directories
+ and files used for a give harness run.
+ </td></tr>
+ <tr><td><u><code>-killTemp</code></u>: The opposite of <code>-keepTemp</code>,
+ this causes the harness to delete temporary (sandbox) directories at
+ the end of each test run.
+ In this case, the file system only accumulates files for
+ the current test.
</td></tr>
<tr><td><u>*- variants</u>: Options with a trailing "-" cause two sets of
option lists to be produced, one with and one without the corresponding