@@ -192,8 +192,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
192
192
193
193
/** A runnable that logs its contents in a buffer */
194
194
trait LoggedRunnable extends Runnable {
195
- import TestReporter .logWriter
196
-
197
195
/** Instances of `LoggedRunnable` implement this method instead of the
198
196
* `run` method
199
197
*/
@@ -212,8 +210,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
212
210
213
211
final def run (): Unit = {
214
212
checkTestSource()
215
- logBuffer.iterator.foreach(logWriter.println)
216
- logWriter.flush()
213
+ summaryReport.echoToLog(logBuffer.iterator)
217
214
}
218
215
}
219
216
@@ -265,7 +262,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
265
262
private [this ] val failedTestSources = mutable.ArrayBuffer .empty[String ]
266
263
protected final def failTestSource (testSource : TestSource , reason : Option [String ] = None ) = synchronized {
267
264
val extra = reason.map(" with reason: " + _).getOrElse(" " )
268
- failedTestSources.append(testSource.title + s " failed (in ${testSource.name} ) " + extra)
265
+ failedTestSources.append(testSource.title + s " failed " + extra)
269
266
fail()
270
267
}
271
268
@@ -309,7 +306,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
309
306
protected def tryCompile (testSource : TestSource )(op : => Unit ): Unit =
310
307
try {
311
308
val testing = s " Testing ${testSource.title}"
312
- TestReporter .logWriter.println (testing)
309
+ summaryReport.echoToLog (testing)
313
310
if (! isInteractive) realStdout.println(testing)
314
311
op
315
312
} catch {
@@ -519,6 +516,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
519
516
}
520
517
521
518
case Failure (output) =>
519
+ echo(s " Test ' ${testSource.title}' failed with output: " )
522
520
echo(output)
523
521
failTestSource(testSource)
524
522
@@ -574,7 +572,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
574
572
575
573
if (! compilerCrashed && errorCount == 0 ) verifier()
576
574
else {
577
- echo(s " \n Compilation failed for: ' $testSource' " )
575
+ echo(s " Compilation failed for: ' ${ testSource.title} ' " )
578
576
val buildInstr = testSource.buildInstructions(errorCount, warningCount)
579
577
addFailureInstruction(buildInstr)
580
578
failTestSource(testSource)
@@ -1018,6 +1016,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1018
1016
.getOrElse {
1019
1017
throw new IllegalStateException (" Unable to reflectively find calling method" )
1020
1018
}
1019
+ .takeWhile(_ != '$' )
1021
1020
}
1022
1021
1023
1022
/** Compiles a single file from the string path `f` using the supplied flags */
@@ -1072,7 +1071,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1072
1071
val targetDir = new JFile (outDir + " /" + sourceDir.getName + " /" )
1073
1072
targetDir.mkdirs()
1074
1073
1075
- val target = JointCompilationSource (callingMethod, randomized, flags, targetDir)
1074
+ val target = JointCompilationSource (s " compiling ' $f ' in test ' $ callingMethod' " , randomized, flags, targetDir)
1076
1075
new CompilationTest (target)
1077
1076
}
1078
1077
@@ -1089,7 +1088,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1089
1088
targetDir.mkdirs()
1090
1089
assert(targetDir.exists, s " couldn't create target directory: $targetDir" )
1091
1090
1092
- val target = JointCompilationSource (callingMethod, files.map(new JFile (_)).toArray, flags, targetDir)
1091
+ val target = JointCompilationSource (s " $testName from $ callingMethod" , files.map(new JFile (_)).toArray, flags, targetDir)
1093
1092
1094
1093
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
1095
1094
new CompilationTest (target)
0 commit comments