@@ -426,8 +426,21 @@ trait ParallelTesting extends RunnerOrchestration { self =>
426
426
427
427
private final class RunTest (testSources : List [TestSource ], times : Int , threadLimit : Option [Int ], suppressAllOutput : Boolean )
428
428
extends Test (testSources, times, threadLimit, suppressAllOutput) {
429
+ private [this ] var didAddNoRunWarning = false
430
+ private [this ] def addNoRunWarning () = if (! didAddNoRunWarning) {
431
+ didAddNoRunWarning = true
432
+ SummaryReport .addStartingMessage {
433
+ """ |WARNING
434
+ |-------
435
+ |Run tests were only compiled, not run - this is due to `dotty.tests.norun`
436
+ |property being set
437
+ |""" .stripMargin
438
+ }
439
+ }
440
+
429
441
private def verifyOutput (checkFile : JFile , dir : JFile , testSource : TestSource , warnings : Int ) = {
430
- runMain(testSource.classPath) match {
442
+ if (Properties .testsNoRun) addNoRunWarning()
443
+ else runMain(testSource.classPath) match {
431
444
case Success (output) => {
432
445
val outputLines = output.lines.toArray
433
446
val checkLines : Array [String ] = Source .fromFile(checkFile).getLines.toArray
@@ -511,16 +524,19 @@ trait ParallelTesting extends RunnerOrchestration { self =>
511
524
}
512
525
513
526
if (errorCount == 0 && hasCheckFile) verifier()
514
- else if (errorCount == 0 ) runMain(testSource.classPath) match {
515
- case Success (_) => // success!
516
- case Failure (output) =>
517
- echo(s " failed when running ' ${testSource.title}' " )
518
- echo(output)
519
- failTestSource(testSource)
520
- case Timeout =>
521
- echo(" failed because test " + testSource.title + " timed out" )
522
- failTestSource(testSource, Some (" test timed out" ))
523
- }
527
+ else if (errorCount == 0 ) {
528
+ if (Properties .testsNoRun) addNoRunWarning()
529
+ else runMain(testSource.classPath) match {
530
+ case Success (_) => // success!
531
+ case Failure (output) =>
532
+ echo(s " failed when running ' ${testSource.title}' " )
533
+ echo(output)
534
+ failTestSource(testSource)
535
+ case Timeout =>
536
+ echo(" failed because test " + testSource.title + " timed out" )
537
+ failTestSource(testSource, Some (" test timed out" ))
538
+ }
539
+ }
524
540
else if (errorCount > 0 ) {
525
541
echo(s " \n Compilation failed for: ' $testSource' " )
526
542
val buildInstr = testSource.buildInstructions(errorCount, warningCount)
0 commit comments