@@ -17,6 +17,7 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
17
17
import ParallelTesting ._
18
18
import TestConfiguration ._
19
19
import BootstrappedOnlyCompilationTests ._
20
+ import CompilationTest .aggregateTests
20
21
21
22
// Test suite configuration --------------------------------------------------
22
23
@@ -31,58 +32,62 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
31
32
32
33
@ Test def posMacros : Unit = {
33
34
implicit val testGroup : TestGroup = TestGroup (" compilePosMacros" )
34
- compileFilesInDir(" tests/pos-macros" , defaultOptions)
35
- }.checkCompile()
35
+ compileFilesInDir(" tests/pos-macros" , defaultOptions).checkCompile()
36
+ }
36
37
37
38
@ Test def posWithCompiler : Unit = {
38
39
implicit val testGroup : TestGroup = TestGroup (" compilePosWithCompiler" )
39
- compileFilesInDir(" tests/pos-with-compiler" , withCompilerOptions) +
40
- compileDir(" compiler/src/dotty/tools/dotc/ast" , withCompilerOptions) +
41
- compileDir(" compiler/src/dotty/tools/dotc/config" , withCompilerOptions) +
42
- compileDir(" compiler/src/dotty/tools/dotc/core" , withCompilerOptions) +
43
- compileDir(" compiler/src/dotty/tools/dotc/transform" , withCompilerOptions) +
44
- compileDir(" compiler/src/dotty/tools/dotc/parsing" , withCompilerOptions) +
45
- compileDir(" compiler/src/dotty/tools/dotc/printing" , withCompilerOptions) +
46
- compileDir(" compiler/src/dotty/tools/dotc/reporting" , withCompilerOptions) +
47
- compileDir(" compiler/src/dotty/tools/dotc/typer" , withCompilerOptions) +
48
- compileDir(" compiler/src/dotty/tools/dotc/util" , withCompilerOptions) +
49
- compileDir(" compiler/src/dotty/tools/io" , withCompilerOptions)
50
- }.checkCompile()
40
+ aggregateTests(
41
+ compileFilesInDir(" tests/pos-with-compiler" , withCompilerOptions),
42
+ compileDir(" compiler/src/dotty/tools/dotc/ast" , withCompilerOptions),
43
+ compileDir(" compiler/src/dotty/tools/dotc/config" , withCompilerOptions),
44
+ compileDir(" compiler/src/dotty/tools/dotc/core" , withCompilerOptions),
45
+ compileDir(" compiler/src/dotty/tools/dotc/transform" , withCompilerOptions),
46
+ compileDir(" compiler/src/dotty/tools/dotc/parsing" , withCompilerOptions),
47
+ compileDir(" compiler/src/dotty/tools/dotc/printing" , withCompilerOptions),
48
+ compileDir(" compiler/src/dotty/tools/dotc/reporting" , withCompilerOptions),
49
+ compileDir(" compiler/src/dotty/tools/dotc/typer" , withCompilerOptions),
50
+ compileDir(" compiler/src/dotty/tools/dotc/util" , withCompilerOptions),
51
+ compileDir(" compiler/src/dotty/tools/io" , withCompilerOptions)
52
+ ).checkCompile()
53
+ }
51
54
52
55
@ Test def posTwiceWithCompiler : Unit = {
53
56
implicit val testGroup : TestGroup = TestGroup (" posTwiceWithCompiler" )
54
- compileFile(" tests/pos-with-compiler/Labels.scala" , withCompilerOptions) +
55
- compileFile(" tests/pos-with-compiler/Patterns.scala" , withCompilerOptions) +
56
- compileList(
57
- " testNonCyclic" ,
58
- List (
59
- " compiler/src/dotty/tools/dotc/CompilationUnit.scala" ,
60
- " compiler/src/dotty/tools/dotc/core/Types.scala" ,
61
- " compiler/src/dotty/tools/dotc/ast/Trees.scala"
62
- ),
63
- withCompilerOptions
64
- ) +
65
- compileList(
66
- " testIssue34" ,
67
- List (
68
- " compiler/src/dotty/tools/dotc/config/Properties.scala" ,
69
- " compiler/src/dotty/tools/dotc/config/PathResolver.scala"
57
+ aggregateTests(
58
+ compileFile(" tests/pos-with-compiler/Labels.scala" , withCompilerOptions),
59
+ compileFile(" tests/pos-with-compiler/Patterns.scala" , withCompilerOptions),
60
+ compileList(
61
+ " testNonCyclic" ,
62
+ List (
63
+ " compiler/src/dotty/tools/dotc/CompilationUnit.scala" ,
64
+ " compiler/src/dotty/tools/dotc/core/Types.scala" ,
65
+ " compiler/src/dotty/tools/dotc/ast/Trees.scala"
66
+ ),
67
+ withCompilerOptions
70
68
),
71
- withCompilerOptions
72
- )
73
- }.times(2 ).checkCompile()
69
+ compileList(
70
+ " testIssue34" ,
71
+ List (
72
+ " compiler/src/dotty/tools/dotc/config/Properties.scala" ,
73
+ " compiler/src/dotty/tools/dotc/config/PathResolver.scala"
74
+ ),
75
+ withCompilerOptions
76
+ )
77
+ ).times(2 ).checkCompile()
78
+ }
74
79
75
80
// Negative tests ------------------------------------------------------------
76
81
77
82
@ Test def negMacros : Unit = {
78
83
implicit val testGroup : TestGroup = TestGroup (" compileNegWithCompiler" )
79
- compileFilesInDir(" tests/neg-macros" , defaultOptions)
80
- }.checkExpectedErrors()
84
+ compileFilesInDir(" tests/neg-macros" , defaultOptions).checkExpectedErrors()
85
+ }
81
86
82
87
@ Test def negWithCompiler : Unit = {
83
88
implicit val testGroup : TestGroup = TestGroup (" compileNegWithCompiler" )
84
- compileFilesInDir(" tests/neg-with-compiler" , withCompilerOptions)
85
- }.checkExpectedErrors()
89
+ compileFilesInDir(" tests/neg-with-compiler" , withCompilerOptions).checkExpectedErrors()
90
+ }
86
91
87
92
// Run tests -----------------------------------------------------------------
88
93
@@ -93,10 +98,12 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
93
98
94
99
@ Test def runWithCompiler : Unit = {
95
100
implicit val testGroup : TestGroup = TestGroup (" runWithCompiler" )
96
- compileFilesInDir(" tests/run-with-compiler" , withCompilerOptions) +
97
- compileDir(" tests/run-with-compiler-custom-args/tasty-interpreter" , withCompilerOptions) +
98
- compileFile(" tests/run-with-compiler-custom-args/staged-streams_1.scala" , withCompilerOptions without " -Yno-deep-subtypes" )
99
- }.checkRuns()
101
+ aggregateTests(
102
+ compileFilesInDir(" tests/run-with-compiler" , withCompilerOptions),
103
+ compileDir(" tests/run-with-compiler-custom-args/tasty-interpreter" , withCompilerOptions),
104
+ compileFile(" tests/run-with-compiler-custom-args/staged-streams_1.scala" , withCompilerOptions without " -Yno-deep-subtypes" )
105
+ ).checkRuns()
106
+ }
100
107
101
108
// Pickling Tests ------------------------------------------------------------
102
109
//
@@ -106,26 +113,28 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
106
113
@ Test def picklingWithCompiler : Unit = {
107
114
val jvmBackendFilter = FileFilter .exclude(List (" BTypes.scala" , " Primitives.scala" )) // TODO
108
115
implicit val testGroup : TestGroup = TestGroup (" testPicklingWithCompiler" )
109
- compileDir(" compiler/src/dotty/tools" , picklingWithCompilerOptions, recursive = false ) +
110
- compileDir(" compiler/src/dotty/tools/dotc" , picklingWithCompilerOptions, recursive = false ) +
111
- compileDir(" library/src/dotty/runtime" , picklingWithCompilerOptions) +
112
- compileFilesInDir(" compiler/src/dotty/tools/backend/jvm" , picklingWithCompilerOptions, jvmBackendFilter) +
113
- compileDir(" compiler/src/dotty/tools/dotc/ast" , picklingWithCompilerOptions) +
114
- compileDir(" compiler/src/dotty/tools/dotc/core" , picklingWithCompilerOptions, recursive = false ) +
115
- compileDir(" compiler/src/dotty/tools/dotc/config" , picklingWithCompilerOptions) +
116
- compileDir(" compiler/src/dotty/tools/dotc/parsing" , picklingWithCompilerOptions) +
117
- compileDir(" compiler/src/dotty/tools/dotc/printing" , picklingWithCompilerOptions) +
118
- compileDir(" compiler/src/dotty/tools/repl" , picklingWithCompilerOptions) +
119
- compileDir(" compiler/src/dotty/tools/dotc/rewrites" , picklingWithCompilerOptions) +
120
- compileDir(" compiler/src/dotty/tools/dotc/transform" , picklingWithCompilerOptions) +
121
- compileDir(" compiler/src/dotty/tools/dotc/typer" , picklingWithCompilerOptions) +
122
- compileDir(" compiler/src/dotty/tools/dotc/util" , picklingWithCompilerOptions) +
123
- compileDir(" compiler/src/dotty/tools/io" , picklingWithCompilerOptions) +
124
- compileFile(" tests/pos/pickleinf.scala" , picklingWithCompilerOptions) +
125
- compileDir(" compiler/src/dotty/tools/dotc/core/classfile" , picklingWithCompilerOptions) +
126
- compileDir(" compiler/src/dotty/tools/dotc/core/tasty" , picklingWithCompilerOptions) +
127
- compileDir(" compiler/src/dotty/tools/dotc/core/unpickleScala2" , picklingWithCompilerOptions)
128
- }.limitThreads(4 ).checkCompile()
116
+ aggregateTests(
117
+ compileDir(" compiler/src/dotty/tools" , picklingWithCompilerOptions, recursive = false ),
118
+ compileDir(" compiler/src/dotty/tools/dotc" , picklingWithCompilerOptions, recursive = false ),
119
+ compileDir(" library/src/dotty/runtime" , picklingWithCompilerOptions),
120
+ compileFilesInDir(" compiler/src/dotty/tools/backend/jvm" , picklingWithCompilerOptions, jvmBackendFilter),
121
+ compileDir(" compiler/src/dotty/tools/dotc/ast" , picklingWithCompilerOptions),
122
+ compileDir(" compiler/src/dotty/tools/dotc/core" , picklingWithCompilerOptions, recursive = false ),
123
+ compileDir(" compiler/src/dotty/tools/dotc/config" , picklingWithCompilerOptions),
124
+ compileDir(" compiler/src/dotty/tools/dotc/parsing" , picklingWithCompilerOptions),
125
+ compileDir(" compiler/src/dotty/tools/dotc/printing" , picklingWithCompilerOptions),
126
+ compileDir(" compiler/src/dotty/tools/repl" , picklingWithCompilerOptions),
127
+ compileDir(" compiler/src/dotty/tools/dotc/rewrites" , picklingWithCompilerOptions),
128
+ compileDir(" compiler/src/dotty/tools/dotc/transform" , picklingWithCompilerOptions),
129
+ compileDir(" compiler/src/dotty/tools/dotc/typer" , picklingWithCompilerOptions),
130
+ compileDir(" compiler/src/dotty/tools/dotc/util" , picklingWithCompilerOptions),
131
+ compileDir(" compiler/src/dotty/tools/io" , picklingWithCompilerOptions),
132
+ compileFile(" tests/pos/pickleinf.scala" , picklingWithCompilerOptions),
133
+ compileDir(" compiler/src/dotty/tools/dotc/core/classfile" , picklingWithCompilerOptions),
134
+ compileDir(" compiler/src/dotty/tools/dotc/core/tasty" , picklingWithCompilerOptions),
135
+ compileDir(" compiler/src/dotty/tools/dotc/core/unpickleScala2" , picklingWithCompilerOptions)
136
+ ).limitThreads(4 ).checkCompile()
137
+ }
129
138
130
139
@ Test def testPlugins : Unit = {
131
140
val pluginFile = " plugin.properties"
0 commit comments