Skip to content

Commit

Permalink
apply system properties to all test framworks
Browse files Browse the repository at this point in the history
  • Loading branch information
Qi77Qi committed Oct 1, 2018
1 parent 08cbc80 commit 2a92c5d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions frontend/src/main/scala/bloop/engine/tasks/Tasks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,18 @@ object Tasks {
List(Config.TestArgument(rawArgs, Some(Config.TestFramework(List(cls)))))
case frameworks =>
val frameworkNames = foundFrameworks(frameworks)
val ignoredArgs = frameworkSpecificRawArgs.mkString(" ")
logger.warn(
val (sysProperties, ignoredArgs) = frameworkSpecificRawArgs.partition(s => s.startsWith("-D"))

if(ignoredArgs.nonEmpty)
logger.warn(
s"Ignored CLI test options '${ignoredArgs}' can only be applied to one framework, found: $frameworkNames")
Nil

val cls = frameworks.map(f => f.getClass.getName)

if(sysProperties.isEmpty)
Nil
else
List(Config.TestArgument(sysProperties, Some(Config.TestFramework(cls))))
}
}
}
Expand Down

0 comments on commit 2a92c5d

Please sign in to comment.