Skip to content

Commit 8f9c1b1

Browse files
committed
Remove custom output directory from vulpix
Use testGroup instead
1 parent f75bbdf commit 8f9c1b1

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

compiler/test/dotc/comptest.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ object comptest extends ParallelTesting {
2424
dotcDir + "tools/dotc/core/Types.scala",
2525
dotcDir + "tools/dotc/ast/Trees.scala"
2626
),
27-
TestFlags("", Array("-Ylog:frontend", "-Xprompt")),
28-
outDirectory = "."
27+
TestFlags("", Array("-Ylog:frontend", "-Xprompt"))
2928
)(TestGroup("comptest"))
3029
}

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,10 @@ class CompilationTests extends ParallelTesting {
307307

308308
@Category(Array(classOf[SlowTests]))
309309
@Test def testOptimised: Unit = {
310-
implicit val testGroup: TestGroup = TestGroup("testOptimised")
311-
val outputDir = defaultOutputDir + "optimised/"
312-
compileFilesInDir("../tests/pos", defaultOptimised, outputDir).checkCompile()
313-
compileFilesInDir("../tests/run", defaultOptimised, outputDir).checkRuns()
314-
compileShallowFilesInDir("../tests/neg", defaultOptimised, outputDir).checkExpectedErrors()
310+
implicit val testGroup: TestGroup = TestGroup("optimised/testOptimised")
311+
compileFilesInDir("../tests/pos", defaultOptimised).checkCompile()
312+
compileFilesInDir("../tests/run", defaultOptimised).checkRuns()
313+
compileShallowFilesInDir("../tests/neg", defaultOptimised).checkExpectedErrors()
315314
}
316315

317316
private val (compilerSources, backendSources, backendJvmSources) = {

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,11 +1034,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10341034
}
10351035

10361036
/** Compiles a single file from the string path `f` using the supplied flags */
1037-
def compileFile(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir)(implicit testGroup: TestGroup): CompilationTest = {
1037+
def compileFile(f: String, flags: TestFlags)(implicit testGroup: TestGroup): CompilationTest = {
10381038
val sourceFile = new JFile(f)
10391039
val parent = sourceFile.getParentFile
10401040
val outDir =
1041-
outDirectory + testGroup + "/" +
1041+
defaultOutputDir + testGroup + "/" +
10421042
sourceFile.getName.substring(0, sourceFile.getName.lastIndexOf('.')) + "/"
10431043

10441044
require(
@@ -1063,8 +1063,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10631063
* By default, files are compiled in alphabetical order. An optional seed
10641064
* can be used for randomization.
10651065
*/
1066-
def compileDir(f: String, flags: TestFlags, randomOrder: Option[Int] = None, outDirectory: String = defaultOutputDir)(implicit testGroup: TestGroup): CompilationTest = {
1067-
val outDir = outDirectory + testGroup + "/"
1066+
def compileDir(f: String, flags: TestFlags, randomOrder: Option[Int] = None)(implicit testGroup: TestGroup): CompilationTest = {
1067+
val outDir = defaultOutputDir + testGroup + "/"
10681068
val sourceDir = new JFile(f)
10691069
checkRequirements(f, sourceDir, outDir)
10701070

@@ -1091,8 +1091,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10911091
* `testName` since files can be in separate directories and or be otherwise
10921092
* dissociated
10931093
*/
1094-
def compileList(testName: String, files: List[String], flags: TestFlags, outDirectory: String = defaultOutputDir)(implicit testGroup: TestGroup): CompilationTest = {
1095-
val outDir = outDirectory + testGroup + "/" + testName + "/"
1094+
def compileList(testName: String, files: List[String], flags: TestFlags)(implicit testGroup: TestGroup): CompilationTest = {
1095+
val outDir = defaultOutputDir + testGroup + "/" + testName + "/"
10961096

10971097
// Directories in which to compile all containing files with `flags`:
10981098
val targetDir = new JFile(outDir)
@@ -1122,8 +1122,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11221122
* - Directories can have an associated check-file, where the check file has
11231123
* the same name as the directory (with the file extension `.check`)
11241124
*/
1125-
def compileFilesInDir(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir)(implicit testGroup: TestGroup): CompilationTest = {
1126-
val outDir = outDirectory + testGroup + "/"
1125+
def compileFilesInDir(f: String, flags: TestFlags)(implicit testGroup: TestGroup): CompilationTest = {
1126+
val outDir = defaultOutputDir + testGroup + "/"
11271127
val sourceDir = new JFile(f)
11281128
checkRequirements(f, sourceDir, outDir)
11291129

@@ -1141,8 +1141,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
11411141
* sub-directories and as such, does **not** perform separate compilation
11421142
* tests.
11431143
*/
1144-
def compileShallowFilesInDir(f: String, flags: TestFlags, outDirectory: String = defaultOutputDir)(implicit testGroup: TestGroup): CompilationTest = {
1145-
val outDir = outDirectory + testGroup + "/"
1144+
def compileShallowFilesInDir(f: String, flags: TestFlags)(implicit testGroup: TestGroup): CompilationTest = {
1145+
val outDir = defaultOutputDir + testGroup + "/"
11461146
val sourceDir = new JFile(f)
11471147
checkRequirements(f, sourceDir, outDir)
11481148

0 commit comments

Comments
 (0)