Skip to content

Commit 01519d2

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

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

compiler/test/dotc/comptest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package dotc
22

3-
import dotty.tools.vulpix.{ParallelTesting, TestFlags}
3+
import dotty.tools.vulpix.{OutDirectory, ParallelTesting, TestFlags}
44

55
import scala.concurrent.duration._
66

@@ -12,7 +12,7 @@ object comptest extends ParallelTesting {
1212
def isInteractive = true
1313
def testFilter = None
1414

15-
implicit val defaultOutputDir: String = "."
15+
implicit val defaultOutputDir: OutDirectory = new OutDirectory(".")
1616

1717
val posDir = "./tests/pos/"
1818
val negDir = "./tests/neg/"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class CompilationTests extends ParallelTesting {
243243

244244
def lib =
245245
compileDir("../library/src",
246-
allowDeepSubtypes.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))
246+
allowDeepSubtypes.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir.toString))
247247

248248
val compilerDir = Paths.get("../compiler/src")
249249
val compilerSources = sources(Files.walk(compilerDir))
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package dotty.tools.vulpix
2+
3+
class OutDirectory(str: String) {
4+
override def toString: String = str
5+
}

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

Lines changed: 5 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)(implicit outDirectory: OutDirectory): 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)(implicit outDirectory: OutDirectory): 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())(implicit outDirectory: OutDirectory): 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)(implicit outDirectory: OutDirectory): 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)(implicit outDirectory: OutDirectory): CompilationTest = {
11711171
val callingMethod = getCallingMethod()
11721172
val outDir = outDirectory + callingMethod + "/"
11731173
val sourceDir = new JFile(f)

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

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

55
object TestConfiguration {
6-
implicit val defaultOutputDir: String = "../out/"
6+
implicit val defaultOutputDir: OutDirectory = new OutDirectory("../out/")
77

88
val noCheckOptions = Array(
99
"-pagewidth", "120",

0 commit comments

Comments
 (0)