@@ -1267,26 +1267,33 @@ trait ParallelTesting extends RunnerOrchestration { self =>
1267
1267
1268
1268
val (dirs, files) = compilationTargets(sourceDir, blacklist)
1269
1269
1270
- val targets =
1271
- files.map { f =>
1272
- val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1273
- JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1274
- }
1270
+ val filteredFiles = testFilter match {
1271
+ case Some (str) => files.filter(_.getAbsolutePath.contains(str))
1272
+ case None => files
1273
+ }
1274
+
1275
+ val targets = filteredFiles.map { f =>
1276
+ val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1277
+ JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, fromTasty = true )
1278
+ }
1275
1279
// TODO add SeparateCompilationSource from tasty?
1276
1280
1277
1281
val targets2 =
1278
- files
1282
+ filteredFiles
1279
1283
.filter(f => dotty.tools.io.File (f.toPath).changeExtension(" decompiled" ).exists)
1280
1284
.map { f =>
1281
- val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1282
- JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1283
- }
1285
+ val classpath = createOutputDirsForFile(f, sourceDir, outDir)
1286
+ JointCompilationSource (testGroup.name, Array (f), flags.withClasspath(classpath.getPath), classpath, decompilation = true )
1287
+ }
1284
1288
1285
1289
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
1286
1290
val generateClassFiles = compileFilesInDir(f, flags0, blacklist)
1287
1291
1288
1292
val decompilationDir = outDir + sourceDir.getName + " _decompiled"
1289
1293
1294
+ if (targets2.isEmpty)
1295
+ new JFile (decompilationDir).mkdirs()
1296
+
1290
1297
new TastyCompilationTest (
1291
1298
generateClassFiles.keepOutput,
1292
1299
new CompilationTest (targets).keepOutput,
0 commit comments