Skip to content

Commit 5611456

Browse files
committed
Make compileList take test name arg
1 parent 98406ae commit 5611456

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

compiler/test/dotc/comptest.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ object comptest extends ParallelTesting {
1212

1313
def main(args: Array[String]): Unit =
1414
compileList(
15+
"comptest",
1516
List(
1617
dotcDir + "tools/dotc/CompilationUnit.scala",
1718
dotcDir + "tools/dotc/core/Types.scala",

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ class CompilationTests extends ParallelTesting {
1010

1111
// Positive tests ------------------------------------------------------------
1212

13-
@Test def compilePos: Unit =
14-
compileFilesInDir("../tests/pos", defaultOptions).pos
13+
@Test def compilePos: Unit = {
14+
compileList("compileStdLib", StdLibSources.whitelisted, scala2Mode.and("-migration", "-Yno-inline")) +
15+
compileFilesInDir("../tests/pos", defaultOptions)
16+
}.pos()
1517

1618
@Test def compilePosScala2: Unit =
1719
compileFilesInDir("../tests/pos-scala2", scala2Mode).pos()
1820

1921
@Test def compilePosMixedFlags: Unit = {
20-
compileList(StdLibSources.whitelisted, scala2Mode.and("-migration", "-Yno-inline")) +
2122
compileFile("../tests/pos/nullarify.scala", defaultOptions.and("-Ycheck:nullarify")) +
2223
// this guy sucks, he changes the sourcefile itself:
2324
// compileFile("../tests/pos-scala2/rewrites.scala", scala2Mode.and("-rewrite")) +
2425
compileFile("../tests/pos-special/t8146a.scala", allowDeepSubtypes) +
2526
compileFile("../tests/pos-special/utf8encoded.scala", explicitUTF8) +
2627
compileFile("../tests/pos-special/utf16encoded.scala", explicitUTF16) +
2728
compileList(
29+
"compileMixed",
2830
List(
2931
"../tests/pos/B.scala",
3032
"../scala-scala/src/library/scala/collection/immutable/Seq.scala",
@@ -40,6 +42,7 @@ class CompilationTests extends ParallelTesting {
4042
compileFile("../scala-scala/src/library/scala/collection/immutable/IndexedSeq.scala", defaultOptions) +
4143
compileFile("../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala", defaultOptions) +
4244
compileList(
45+
"parSetSubset",
4346
List(
4447
"../scala-scala/src/library/scala/collection/parallel/mutable/ParSetLike.scala",
4548
"../scala-scala/src/library/scala/collection/parallel/mutable/ParSet.scala",
@@ -103,6 +106,7 @@ class CompilationTests extends ParallelTesting {
103106
compileFile("../tests/pos/extmethods.scala", defaultOptions) +
104107
compileFile("../tests/pos/companions.scala", defaultOptions) +
105108
compileList(
109+
"testNonCyclic",
106110
List(
107111
"../compiler/src/dotty/tools/dotc/CompilationUnit.scala",
108112
"../compiler/src/dotty/tools/dotc/core/Types.scala",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ trait ParallelTesting {
596596
new CompilationTest(target)
597597
}
598598

599-
def compileList(files: List[String], flags: Array[String])(implicit outDirectory: String): CompilationTest = {
599+
def compileList(testName: String, files: List[String], flags: Array[String])(implicit outDirectory: String): CompilationTest = {
600600
val outDir = outDirectory + getCallingMethod + "/" + testName + "/"
601601

602602
// Directories in which to compile all containing files with `flags`:

0 commit comments

Comments
 (0)