8144009: ToolBox should have a cleanDirectory method

Added cleanDirectory method to ToolBox.

Reviewed-by: jjg
This commit is contained in:
Andreas Lundblad 2015-11-26 09:33:41 +01:00
parent 68126c8ee9
commit ea92f6bf06
14 changed files with 36 additions and 71 deletions

View file

@ -36,6 +36,7 @@
* @run main Wrapper CompileCircularSources
*/
import java.io.IOException;
import java.util.*;
import java.nio.file.*;
@ -46,13 +47,11 @@ public class CompileCircularSources extends SJavacTester {
}
void test() throws Exception {
clean(TEST_ROOT);
Files.createDirectories(BIN);
clean(GENSRC, BIN);
Files.createDirectories(GENSRC);
Map<String,Long> previous_bin_state = collectState(BIN);
ToolBox tb = new ToolBox();
tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
"package alfa.omega; public class A { beta.B b; }");
tb.writeFile(GENSRC.resolve("beta/B.java"),
@ -74,6 +73,5 @@ public class CompileCircularSources extends SJavacTester {
BIN + "/beta/B.class",
BIN + "/gamma/C.class",
BIN + "/javac_state");
clean(GENSRC, BIN);
}
}