@@ -96,6 +96,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
9696 self.copy(flags = flags.without(flags1 : _* ))
9797 }
9898
99+ lazy val allToolArgs : ToolArgs =
100+ toolArgsFor(sourceFiles.toList.map(_.toPath), getCharsetFromEncodingOpt(flags))
101+
99102 /** Generate the instructions to redo the test from the command line */
100103 def buildInstructions (errors : Int , warnings : Int ): String = {
101104 val sb = new StringBuilder
@@ -199,6 +202,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
199202 def sourceFiles = compilationGroups.map(_._2).flatten.toArray
200203 }
201204
205+ protected def shouldSkipTestSource (testSource : TestSource ): Boolean =
206+ false
207+
202208 private trait CompilationLogic { this : Test =>
203209 def suppressErrors = false
204210
@@ -344,13 +350,15 @@ trait ParallelTesting extends RunnerOrchestration { self =>
344350
345351 /** All testSources left after filtering out */
346352 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(_))
354362
355363 /** Total amount of test sources being compiled by this test */
356364 val sourceCount = filteredSources.length
@@ -739,7 +747,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
739747
740748 private def verifyOutput (checkFile : Option [JFile ], dir : JFile , testSource : TestSource , warnings : Int , reporters : Seq [TestReporter ], logger : LoggedRunnable ) = {
741749 if (Properties .testsNoRun) addNoRunWarning()
742- else runMain(testSource.runClassPath) match {
750+ else runMain(testSource.runClassPath, testSource.allToolArgs ) match {
743751 case Success (output) => checkFile match {
744752 case Some (file) if file.exists => diffTest(testSource, file, output.linesIterator.toList, reporters, logger)
745753 case _ =>
0 commit comments