From a8ffa2f7ef1d4b9a0efa0abf2943e11cd3570ccf Mon Sep 17 00:00:00 2001 From: rochala Date: Thu, 6 Jul 2023 16:08:30 +0200 Subject: [PATCH] Catch access denied exception in windows tests --- compiler/test/dotty/tools/vulpix/ParallelTesting.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index bccbcbee29e1..96c52ca72476 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -8,7 +8,7 @@ import java.io.{File => JFile, IOException, PrintStream, ByteArrayOutputStream} import java.lang.System.{lineSeparator => EOL} import java.net.URL import java.nio.file.StandardCopyOption.REPLACE_EXISTING -import java.nio.file.{Files, NoSuchFileException, Path, Paths} +import java.nio.file.{AccessDeniedException, Files, NoSuchFileException, Path, Paths} import java.nio.charset.{Charset, StandardCharsets} import java.text.SimpleDateFormat import java.util.{HashMap, Timer, TimerTask} @@ -1193,6 +1193,7 @@ trait ParallelTesting extends RunnerOrchestration { self => try Files.delete(file.toPath) catch { case _: NoSuchFileException => // already deleted, everything's fine + case _: AccessDeniedException => // windows can throw these, ignore } } }