Skip to content

Commit e35a7be

Browse files
committed
Re-encode vulpix implicit output directory
1 parent 2664fe3 commit e35a7be

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

compiler/test/dotc/comptest.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ object comptest extends ParallelTesting {
1212
def isInteractive = true
1313
def testFilter = None
1414

15-
implicit val defaultOutputDir: String = "."
16-
1715
val posDir = "./tests/pos/"
1816
val negDir = "./tests/neg/"
1917
val dotcDir = "./src/dotty/"
@@ -26,6 +24,7 @@ object comptest extends ParallelTesting {
2624
dotcDir + "tools/dotc/core/Types.scala",
2725
dotcDir + "tools/dotc/ast/Trees.scala"
2826
),
29-
TestFlags("", Array("-Ylog:frontend", "-Xprompt"))
27+
TestFlags("", Array("-Ylog:frontend", "-Xprompt")),
28+
outDirectory = "."
3029
)
3130
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import dotty.tools.io.JFile
1515

1616

1717
class CompilationTests extends ParallelTesting {
18+
import ParallelTesting._
1819
import TestConfiguration._
1920
import CompilationTests._
2021

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import scala.concurrent.duration._
1313
import scala.collection.JavaConverters._
1414

1515
class LinkOptimiseTests extends ParallelTesting {
16+
import ParallelTesting._
1617
import TestConfiguration._
1718
import LinkOptimiseTests._
1819

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10571057
}
10581058

10591059
/** Compiles a single file from the string path `f` using the supplied flags */
1060-
def compileFile(f: String, flags: TestFlags)(implicit outDirectory: String): CompilationTest = {
1060+
def compileFile(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir): CompilationTest = {
10611061
val callingMethod = getCallingMethod()
10621062
val sourceFile = new JFile(f)
10631063
val parent = sourceFile.getParentFile
@@ -1087,7 +1087,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10871087
* By default, files are compiled in alphabetical order. An optional seed
10881088
* can be used for randomization.
10891089
*/
1090-
def compileDir(f: String, flags: TestFlags, randomOrder: Option[Int] = None)(implicit outDirectory: String): CompilationTest = {
1090+
def compileDir(f: String, flags: TestFlags, randomOrder: Option[Int] = None, outDirectory: String = defaultOutputDir): CompilationTest = {
10911091
val callingMethod = getCallingMethod()
10921092
val outDir = outDirectory + callingMethod + "/"
10931093
val sourceDir = new JFile(f)
@@ -1116,7 +1116,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11161116
* `testName` since files can be in separate directories and or be otherwise
11171117
* dissociated
11181118
*/
1119-
def compileList(testName: String, files: List[String], flags: TestFlags, callingMethod: String = getCallingMethod())(implicit outDirectory: String): CompilationTest = {
1119+
def compileList(testName: String, files: List[String], flags: TestFlags, callingMethod: String = getCallingMethod(), outDirectory: String = defaultOutputDir): CompilationTest = {
11201120
val outDir = outDirectory + callingMethod + "/" + testName + "/"
11211121

11221122
// Directories in which to compile all containing files with `flags`:
@@ -1147,7 +1147,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11471147
* - Directories can have an associated check-file, where the check file has
11481148
* the same name as the directory (with the file extension `.check`)
11491149
*/
1150-
def compileFilesInDir(f: String, flags: TestFlags)(implicit outDirectory: String): CompilationTest = {
1150+
def compileFilesInDir(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir): CompilationTest = {
11511151
val callingMethod = getCallingMethod()
11521152
val outDir = outDirectory + callingMethod + "/"
11531153
val sourceDir = new JFile(f)
@@ -1167,7 +1167,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11671167
* sub-directories and as such, does **not** perform separate compilation
11681168
* tests.
11691169
*/
1170-
def compileShallowFilesInDir(f: String, flags: TestFlags)(implicit outDirectory: String): CompilationTest = {
1170+
def compileShallowFilesInDir(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir): CompilationTest = {
11711171
val callingMethod = getCallingMethod()
11721172
val outDir = outDirectory + callingMethod + "/"
11731173
val sourceDir = new JFile(f)
@@ -1185,6 +1185,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11851185
}
11861186

11871187
object ParallelTesting {
1188+
1189+
def defaultOutputDir: String = "../out/"
1190+
11881191
def isSourceFile(f: JFile): Boolean = {
11891192
val name = f.getName
11901193
name.endsWith(".scala") || name.endsWith(".java")

compiler/test/dotty/tools/vulpix/TestConfiguration.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package tools
33
package vulpix
44

55
object TestConfiguration {
6-
implicit val defaultOutputDir: String = "../out/"
76

87
val noCheckOptions = Array(
98
"-pagewidth", "120",

0 commit comments

Comments
 (0)