Skip to content

Commit

Permalink
Rename --filter to --only | -o
Browse files Browse the repository at this point in the history
Fixes #327.
  • Loading branch information
jvican committed Mar 27, 2018
1 parent cef2242 commit 60aa3bc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions frontend/src/main/scala/bloop/cli/Commands.scala
Expand Up @@ -109,9 +109,9 @@ object Commands {
project: String = "",
@HelpMessage("Do not run tests for dependencies. By default, false.")
isolated: Boolean = false,
@ExtraName("f")
@HelpMessage("One or more filters to run only selected test suites.")
filter: List[String] = Nil,
@ExtraName("o")
@HelpMessage("The list of test suite filters to test for only.")
only: List[String] = Nil,
@HelpMessage("Pick reporter to show compilation messages. By default, bloop's used.")
reporter: ReporterKind = BloopReporter,
@ExtraName("w")
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/main/scala/bloop/engine/Interpreter.scala
Expand Up @@ -178,7 +178,7 @@ object Interpreter {
Tasks.pickTestProject(cmd.project, state) match {
case Some(project) =>
def doTest(state: State): Task[State] = {
val testFilter = TestInternals.parseFilters(cmd.filter)
val testFilter = TestInternals.parseFilters(cmd.only)
val cwd = cmd.cliOptions.common.workingPath

compileAnd(state, project, reporterConfig, excludeRoot = false) { state =>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/test/scala/bloop/testing/TestFilterSpec.scala
Expand Up @@ -99,7 +99,7 @@ class TestFilterSpec {
val projectName = "with-tests"
val testName = "hello.ScalaTestTest"
val state = ProjectHelpers.loadTestProject(projectName).copy(logger = logger)
val command = Run(Commands.Test(projectName, filter = testName :: Nil))
val command = Run(Commands.Test(projectName, only = testName :: Nil))
val newState = Interpreter.execute(command, state)
assertTrue("Test execution failed.", newState.status.isOk)
val messages = logger.getMessages
Expand All @@ -119,7 +119,7 @@ class TestFilterSpec {
val testName = "hello.ScalaTestTest"
val exclusionFilter = s"-$testName"
val state = ProjectHelpers.loadTestProject(projectName).copy(logger = logger)
val command = Run(Commands.Test(projectName, filter = exclusionFilter :: Nil))
val command = Run(Commands.Test(projectName, only = exclusionFilter :: Nil))
val newState = Interpreter.execute(command, state)
assertTrue("Test execution failed.", newState.status.isOk)
val messages = logger.getMessages
Expand All @@ -140,7 +140,7 @@ class TestFilterSpec {
val inclusionFilter = "hello.*a*"
val state = ProjectHelpers.loadTestProject(projectName).copy(logger = logger)
val command = Run(
Commands.Test(projectName, filter = exclusionFilter :: inclusionFilter :: Nil))
Commands.Test(projectName, only = exclusionFilter :: inclusionFilter :: Nil))
val newState = Interpreter.execute(command, state)
assertTrue("Test execution failed.", newState.status.isOk)
val messages = logger.getMessages
Expand Down

0 comments on commit 60aa3bc

Please sign in to comment.