Browse Source

-killTemp to delete temp directories when each test case completes

tags/V1_1_0_RC2
wisberg 21 years ago
parent
commit
8bac6711e5

+ 12
- 3
testing-drivers/src/org/aspectj/testing/drivers/Harness.java View File

@@ -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 {

+ 8
- 0
testing-drivers/src/org/aspectj/testing/drivers/package.html View File

@@ -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

Loading…
Cancel
Save