@@ -44,11 +44,11 @@ trait ParallelTesting extends RunnerOrchestration { self =>
44
44
*/
45
45
def isInteractive : Boolean
46
46
47
- /** A string which is used to filter which tests to run, if `None ` will run
48
- * all tests. All absolute paths that contain the substring `testFilter`
47
+ /** A list of strings which is used to filter which tests to run, if `Nil ` will run
48
+ * all tests. All absolute paths that contain any of the substrings in `testFilter`
49
49
* will be run
50
50
*/
51
- def testFilter : Option [String ]
51
+ def testFilter : List [String ]
52
52
53
53
/** Tests should override the checkfiles with the current output */
54
54
def updateCheckFiles : Boolean
@@ -340,12 +340,12 @@ trait ParallelTesting extends RunnerOrchestration { self =>
340
340
341
341
/** All testSources left after filtering out */
342
342
private val filteredSources =
343
- if (! testFilter.isDefined ) testSources
343
+ if (testFilter.isEmpty ) testSources
344
344
else testSources.filter {
345
345
case JointCompilationSource (_, files, _, _, _, _) =>
346
- files.exists(file => file.getPath.contains(testFilter.get ))
346
+ testFilter.exists(filter => files.exists(file => file.getPath.contains(filter) ))
347
347
case SeparateCompilationSource (_, dir, _, _) =>
348
- dir.getPath.contains(testFilter.get )
348
+ testFilter.exists( dir.getPath.contains)
349
349
}
350
350
351
351
/** Total amount of test sources being compiled by this test */
@@ -581,9 +581,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
581
581
else reportPassed()
582
582
}
583
583
else echo {
584
- testFilter
585
- .map(r => s """ No files matched " $r " in test""" )
586
- .getOrElse( " No tests available under target - erroneous test?" )
584
+ testFilter match
585
+ case _ :: _ => s """ No files matched " ${testFilter.mkString( " , " )} " in test"""
586
+ case _ => " No tests available under target - erroneous test?"
587
587
}
588
588
589
589
this
@@ -1269,10 +1269,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1269
1269
1270
1270
val (dirs, files) = compilationTargets(sourceDir, fromTastyFilter)
1271
1271
1272
- val filteredFiles = testFilter match {
1273
- case Some (str) => files.filter(_.getPath.contains(str))
1274
- case None => files
1275
- }
1272
+ val filteredFiles = testFilter match
1273
+ case _ :: _ => files.filter(f => testFilter.exists(f.getPath.contains))
1274
+ case _ => Nil
1276
1275
1277
1276
class JointCompilationSourceFromTasty (
1278
1277
name : String ,
0 commit comments