8195077: [Testbug] tools/javac/processing/model/completionfailure/NoAbortForBadClassFile.java - AccessDeniedException

Use a new working directory for each sub-test.

Reviewed-by: vromero
This commit is contained in:
Jan Lahoda 2018-06-22 11:26:55 +02:00
parent b0c5afb037
commit 51c3a9d4d1

View File

@ -135,15 +135,13 @@ public class NoAbortForBadClassFile extends TestRunner {
permutations(files, Collections.emptyList(), result);
int testNum = 0;
for (List<Path> order : result) {
for (Path missing : order) {
Path test = base.resolve("test");
Path test = base.resolve(String.valueOf(testNum++)).resolve("test");
if (Files.exists(test)) {
tb.cleanDirectory(test);
} else {
tb.createDirectories(test);
}
tb.createDirectories(test);
for (Path p : order) {
Files.copy(p, test.resolve(p.getFileName()));