Skip to content

Commit d529cde

Browse files
committed
set dest directory of dotc_core_nocheck to ./out
1 parent 71e74a4 commit d529cde

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

test/dotc/tests.scala

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package dotc
22

33
import test._
4-
import org.junit.Test
4+
import org.junit.{Before, Test}
5+
56
import scala.reflect.io.Directory
67
import scala.io.Source
78

@@ -10,19 +11,19 @@ class tests extends CompilerTest {
1011

1112
def isRunByJenkins: Boolean = sys.props.isDefinedAt("dotty.jenkins.build")
1213

14+
val defaultOutputDir = "./out/"
15+
1316
val noCheckOptions = List(
1417
// "-verbose",
1518
// "-Ylog:frontend",
1619
// "-Xprompt",
1720
// "-explaintypes",
1821
// "-Yshow-suppressed-errors",
22+
"-d", defaultOutputDir,
1923
"-pagewidth", "160")
2024

21-
val defaultOutputDir = "./out/"
22-
23-
implicit val defaultOptions = noCheckOptions ++ List(
24-
"-Yno-deep-subtypes", "-Yno-double-bindings", "-Yforce-sbt-phases",
25-
"-d", defaultOutputDir) ++ {
25+
implicit val defaultOptions = noCheckOptions ++
26+
List("-Yno-deep-subtypes", "-Yno-double-bindings", "-Yforce-sbt-phases") ++ {
2627
if (isRunByJenkins) List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef") // should be Ycheck:all, but #725
2728
else List("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
2829
}
@@ -55,6 +56,12 @@ class tests extends CompilerTest {
5556
val dottyReplDir = dotcDir + "repl/"
5657
val typerDir = dotcDir + "typer/"
5758

59+
@Before def cleanup(): Unit = {
60+
// remove class files from stdlib and tests compilation
61+
Directory(defaultOutputDir + "scala").deleteRecursively()
62+
Directory(defaultOutputDir + "java").deleteRecursively()
63+
}
64+
5865
@Test def pickle_pickleOK = compileDir(testsDir, "pickling", testPickling)
5966
// This directory doesn't exist anymore
6067
// @Test def pickle_pickling = compileDir(coreDir, "pickling", testPickling)
@@ -288,10 +295,6 @@ class tests extends CompilerTest {
288295
@Test def tasty_tests = compileDir(testsDir, "tasty", testPickling)
289296

290297
@Test def tasty_bootstrap = {
291-
// remove class files from stdlib and tests compilation
292-
Directory(defaultOutputDir + "scala").deleteRecursively()
293-
Directory(defaultOutputDir + "java").deleteRecursively()
294-
295298
val opt = List("-classpath", defaultOutputDir, "-Ylog-classpath")
296299
// first compile dotty
297300
compileDir(dottyDir, ".", List("-deep", "-Ycheck-reentrant", "-strict"))(allowDeepSubtypes)

0 commit comments

Comments
 (0)