Skip to content

Commit 8276064

Browse files
authored
Merge pull request #3060 from allanrenucci/fix-missing-out-dir
Fix failing test case
2 parents a84bcf5 + c2572e0 commit 8276064

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

compiler/test/dotty/tools/dotc/InterfaceEntryPointTest.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.junit.Test
55
import org.junit.Assert._
66
import interfaces._
77
import scala.collection.mutable.ListBuffer
8+
import java.nio.file._
89

910
/** Test that demonstrates how to use dotty-interfaces
1011
*
@@ -20,8 +21,12 @@ import scala.collection.mutable.ListBuffer
2021
class InterfaceEntryPointTest {
2122
@Test def runCompilerFromInterface = {
2223
val sources =
23-
List("../tests/pos/HelloWorld.scala").map(p => new java.io.File(p).getPath())
24-
val args = sources ++ List("-d", "../out/", "-usejavacp")
24+
List("../tests/pos/HelloWorld.scala").map(p => Paths.get(p).toAbsolutePath().toString)
25+
val out = Paths.get("../out/").toAbsolutePath()
26+
if (Files.notExists(out))
27+
Files.createDirectory(out)
28+
29+
val args = sources ++ List("-d", out.toString, "-usejavacp")
2530

2631
val mainClass = Class.forName("dotty.tools.dotc.Main")
2732
val process = mainClass.getMethod("process",

0 commit comments

Comments
 (0)