@@ -33,10 +33,12 @@ class CompilationTests extends ParallelTesting {
33
33
34
34
// @Test // enable to test compileStdLib separately with detailed stats
35
35
def compileStdLib : Unit = {
36
+ implicit val testGroup : TestGroup = TestGroup (" compileStdLib" )
36
37
compileList(" compileStdLib" , StdLibSources .whitelisted, scala2Mode.and(" -migration" , " -Yno-inline" , " -Ydetailed-stats" ))
37
38
}.checkCompile()
38
39
39
40
@ Test def compilePos : Unit = {
41
+ implicit val testGroup : TestGroup = TestGroup (" compilePos" )
40
42
compileList(" compileStdLib" , StdLibSources .whitelisted, scala2Mode.and(" -migration" , " -Yno-inline" )) +
41
43
compileDir(" ../compiler/src/dotty/tools/dotc/ast" , defaultOptions) +
42
44
compileDir(" ../compiler/src/dotty/tools/dotc/config" , defaultOptions) +
@@ -102,6 +104,7 @@ class CompilationTests extends ParallelTesting {
102
104
}.checkCompile()
103
105
104
106
@ Test def posTwice : Unit = {
107
+ implicit val testGroup : TestGroup = TestGroup (" posTwice" )
105
108
compileFile(" ../tests/pos/Labels.scala" , defaultOptions) +
106
109
compileFilesInDir(" ../tests/pos-java-interop" , defaultOptions) +
107
110
compileFile(" ../tests/pos/t2168.scala" , defaultOptions) +
@@ -160,6 +163,7 @@ class CompilationTests extends ParallelTesting {
160
163
// Negative tests ------------------------------------------------------------
161
164
162
165
@ Test def compileNeg : Unit = {
166
+ implicit val testGroup : TestGroup = TestGroup (" compileNeg" )
163
167
compileShallowFilesInDir(" ../tests/neg" , defaultOptions) +
164
168
compileShallowFilesInDir(" ../tests/neg/no-optimise" , defaultOptions) +
165
169
compileFile(" ../tests/neg/customArgs/typers.scala" , allowDoubleBindings) +
@@ -189,13 +193,15 @@ class CompilationTests extends ParallelTesting {
189
193
// Run tests -----------------------------------------------------------------
190
194
191
195
@ Test def runAll : Unit = {
196
+ implicit val testGroup : TestGroup = TestGroup (" runAll" )
192
197
compileFilesInDir(" ../tests/run" , defaultOptions) +
193
198
compileFilesInDir(" ../tests/run-no-optimise" , defaultOptions)
194
199
}.checkRuns()
195
200
196
201
// Generic java signatures tests ---------------------------------------------
197
202
198
203
@ Test def genericJavaSignatures : Unit = {
204
+ implicit val testGroup : TestGroup = TestGroup (" genericJavaSignatures" )
199
205
compileFilesInDir(" ../tests/generic-java-signatures" , defaultOptions)
200
206
}.checkRuns()
201
207
@@ -205,6 +211,7 @@ class CompilationTests extends ParallelTesting {
205
211
// lower level of concurrency as to not kill their running VMs
206
212
207
213
@ Test def testPickling : Unit = {
214
+ implicit val testGroup : TestGroup = TestGroup (" testPickling" )
208
215
compileDir(" ../compiler/src/dotty/tools" , picklingOptions) +
209
216
compileDir(" ../compiler/src/dotty/tools/dotc" , picklingOptions) +
210
217
compileFilesInDir(" ../tests/new" , picklingOptions) +
@@ -233,18 +240,23 @@ class CompilationTests extends ParallelTesting {
233
240
* version of Dotty
234
241
*/
235
242
@ Test def tastyBootstrap : Unit = {
243
+ implicit val testGroup : TestGroup = TestGroup (" tastyBootstrap/tests" )
244
+ val dotty1Group = TestGroup (" tastyBootstrap/dotty1" )
245
+ val dotty2Group = TestGroup (" tastyBootstrap/dotty2" )
246
+ val libGroup = TestGroup (" tastyBootstrap/lib" )
247
+
236
248
val opt = TestFlags (
237
249
// compile with bootstrapped library on cp:
238
- defaultOutputDir + " lib /src/:" +
250
+ defaultOutputDir + libGroup + " /src/:" +
239
251
// as well as bootstrapped compiler:
240
- defaultOutputDir + " dotty1 /dotty/:" +
252
+ defaultOutputDir + dotty1Group + " /dotty/:" +
241
253
Jars .dottyInterfaces,
242
254
Array (" -Ycheck-reentrant" )
243
255
)
244
256
245
- def lib =
257
+ val lib =
246
258
compileDir(" ../library/src" ,
247
- defaultOptions.and(" -Ycheck-reentrant" , " -strict" , " -priorityclasspath" , defaultOutputDir))
259
+ defaultOptions.and(" -Ycheck-reentrant" , " -strict" , " -priorityclasspath" , defaultOutputDir))(libGroup)
248
260
249
261
val compilerDir = Paths .get(" ../compiler/src" )
250
262
val compilerSources = sources(Files .walk(compilerDir))
@@ -263,19 +275,8 @@ class CompilationTests extends ParallelTesting {
263
275
val backendJvmSources =
264
276
sources(Files .list(backendJvmDir), excludedFiles = backendJvmExcluded)
265
277
266
- def dotty1 = {
267
- compileList(
268
- " dotty" ,
269
- compilerSources ++ backendSources ++ backendJvmSources,
270
- opt)
271
- }
272
-
273
- def dotty2 = {
274
- compileList(
275
- " dotty" ,
276
- compilerSources ++ backendSources ++ backendJvmSources,
277
- opt)
278
- }
278
+ val dotty1 = compileList(" dotty" , compilerSources ++ backendSources ++ backendJvmSources, opt)(dotty1Group)
279
+ val dotty2 = compileList(" dotty" , compilerSources ++ backendSources ++ backendJvmSources, opt)(dotty2Group)
279
280
280
281
val tests = {
281
282
lib.keepOutput :: dotty1.keepOutput :: {
@@ -296,19 +297,20 @@ class CompilationTests extends ParallelTesting {
296
297
}.keepOutput :: Nil
297
298
}.map(_.checkCompile())
298
299
299
- assert(new java.io.File (" ../out/dotty1/dotty/" ).exists)
300
- assert(new java.io.File (" ../out/dotty2/dotty/" ).exists)
300
+ assert(new java.io.File (s " ../out/ $dotty1Group/dotty/ " ).exists)
301
+ assert(new java.io.File (s " ../out/ $dotty2Group/dotty/ " ).exists)
302
+ assert(new java.io.File (s " ../out/ $libGroup/src/ " ).exists)
301
303
compileList(" idempotency" , List (" ../tests/idempotency/BootstrapChecker.scala" , " ../tests/idempotency/IdempotencyCheck.scala" ), defaultOptions).checkRuns()
302
304
303
305
tests.foreach(_.delete())
304
306
}
305
307
306
308
@ Category (Array (classOf [SlowTests ]))
307
309
@ Test def testOptimised : Unit = {
308
- val outputDir = defaultOutputDir + " optimised/"
309
- compileFilesInDir(" ../tests/pos" , defaultOptimised, outputDir ).checkCompile()
310
- compileFilesInDir(" ../tests/run" , defaultOptimised, outputDir ).checkRuns()
311
- 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()
312
314
}
313
315
314
316
private val (compilerSources, backendSources, backendJvmSources) = {
0 commit comments