aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/ParallelTesting.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-03-17 11:35:15 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-03-29 10:33:24 +0200
commitf6eb90208177866af339540ee7658c0d11fc3882 (patch)
tree698b6b8884511ea6ce861d61b07beb05dc0bcebb /compiler/test/dotty/tools/dotc/ParallelTesting.scala
parent404ce89a1b9408e4c3ceb2f90eddbdb776e011c6 (diff)
downloaddotty-f6eb90208177866af339540ee7658c0d11fc3882.tar.gz
dotty-f6eb90208177866af339540ee7658c0d11fc3882.tar.bz2
dotty-f6eb90208177866af339540ee7658c0d11fc3882.zip
Kill partest
Diffstat (limited to 'compiler/test/dotty/tools/dotc/ParallelTesting.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/ParallelTesting.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelTesting.scala b/compiler/test/dotty/tools/dotc/ParallelTesting.scala
index 2c9e813e1..62bd9fb7b 100644
--- a/compiler/test/dotty/tools/dotc/ParallelTesting.scala
+++ b/compiler/test/dotty/tools/dotc/ParallelTesting.scala
@@ -11,7 +11,7 @@ import reporting.diagnostic.MessageContainer
import interfaces.Diagnostic.ERROR
import java.lang.reflect.InvocationTargetException
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
-import java.nio.file.{ Files, Path, Paths }
+import java.nio.file.{ Files, Path, Paths, NoSuchFileException }
import java.util.concurrent.{ Executors => JExecutors, TimeUnit }
import scala.util.control.NonFatal
import java.util.HashMap
@@ -343,10 +343,10 @@ trait ParallelTesting {
times: Int,
shouldDelete: Boolean
) {
- def this(target: Target, fromDir: String, flags: Array[String]) =
+ private[ParallelTesting] def this(target: Target, fromDir: String, flags: Array[String]) =
this(List(target), fromDir, flags, 1, true)
- def this(targets: List[Target], fromDir: String, flags: Array[String]) =
+ private[ParallelTesting] def this(targets: List[Target], fromDir: String, flags: Array[String]) =
this(targets, fromDir, flags, 1, true)
def pos: this.type = {
@@ -389,7 +389,10 @@ trait ParallelTesting {
private def delete(file: JFile): Unit = {
if (file.isDirectory) file.listFiles.foreach(delete)
- Files.delete(file.toPath)
+ try Files.delete(file.toPath)
+ catch {
+ case _: NoSuchFileException => // already deleted, everything's fine
+ }
}
}