From 99fbc08f31a9ab5cbb793551e977cfecef600388 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 17 Aug 2018 16:45:24 +0200 Subject: [PATCH 1/2] Fix #3613: Delete output dir before testing tastyBootstrap --- compiler/test/dotty/tools/dotc/CompilationTests.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 2ff348ca3425..a0aaf356a143 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -196,6 +196,9 @@ class CompilationTests extends ParallelTesting { val dotty2Group = TestGroup("tastyBootstrap/dotty2") val libGroup = TestGroup("tastyBootstrap/lib") + // Make sure that the directory is clean + dotty.tools.io.Path(s"out/tastyBootstrap").deleteRecursively() + val opt = TestFlags( // compile with bootstrapped library on cp: defaultOutputDir + libGroup + "/src/:" + From 624cc774320d99c1e14568438e44cbc8c351aad8 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 17 Aug 2018 18:19:43 +0200 Subject: [PATCH 2/2] Prevent unnecessary IOs --- compiler/test/dotty/tools/dotc/CompilationTests.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index a0aaf356a143..931571cdf43a 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -197,7 +197,7 @@ class CompilationTests extends ParallelTesting { val libGroup = TestGroup("tastyBootstrap/lib") // Make sure that the directory is clean - dotty.tools.io.Path(s"out/tastyBootstrap").deleteRecursively() + dotty.tools.io.Directory(defaultOutputDir + "tastyBootstrap").deleteRecursively() val opt = TestFlags( // compile with bootstrapped library on cp: