@@ -96,6 +96,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
96
96
self.copy(flags = flags.without(flags1 : _* ))
97
97
}
98
98
99
+ lazy val allToolArgs : ToolArgs =
100
+ toolArgsFor(sourceFiles.toList.map(_.toPath), getCharsetFromEncodingOpt(flags))
101
+
99
102
/** Generate the instructions to redo the test from the command line */
100
103
def buildInstructions (errors : Int , warnings : Int ): String = {
101
104
val sb = new StringBuilder
@@ -199,6 +202,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
199
202
def sourceFiles = compilationGroups.map(_._2).flatten.toArray
200
203
}
201
204
205
+ protected def shouldSkipTestSource (testSource : TestSource ): Boolean =
206
+ false
207
+
202
208
private trait CompilationLogic { this : Test =>
203
209
def suppressErrors = false
204
210
@@ -344,13 +350,15 @@ trait ParallelTesting extends RunnerOrchestration { self =>
344
350
345
351
/** All testSources left after filtering out */
346
352
private val filteredSources =
347
- if (testFilter.isEmpty) testSources
348
- else testSources.filter {
349
- case JointCompilationSource (_, files, _, _, _, _) =>
350
- testFilter.exists(filter => files.exists(file => file.getPath.contains(filter)))
351
- case SeparateCompilationSource (_, dir, _, _) =>
352
- testFilter.exists(dir.getPath.contains)
353
- }
353
+ val filteredByName =
354
+ if (testFilter.isEmpty) testSources
355
+ else testSources.filter {
356
+ case JointCompilationSource (_, files, _, _, _, _) =>
357
+ testFilter.exists(filter => files.exists(file => file.getPath.contains(filter)))
358
+ case SeparateCompilationSource (_, dir, _, _) =>
359
+ testFilter.exists(dir.getPath.contains)
360
+ }
361
+ filteredByName.filterNot(shouldSkipTestSource(_))
354
362
355
363
/** Total amount of test sources being compiled by this test */
356
364
val sourceCount = filteredSources.length
@@ -739,7 +747,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
739
747
740
748
private def verifyOutput (checkFile : Option [JFile ], dir : JFile , testSource : TestSource , warnings : Int , reporters : Seq [TestReporter ], logger : LoggedRunnable ) = {
741
749
if (Properties .testsNoRun) addNoRunWarning()
742
- else runMain(testSource.runClassPath) match {
750
+ else runMain(testSource.runClassPath, testSource.allToolArgs ) match {
743
751
case Success (output) => checkFile match {
744
752
case Some (file) if file.exists => diffTest(testSource, file, output.linesIterator.toList, reporters, logger)
745
753
case _ =>
0 commit comments