Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit ee93a37

Browse files
committed
Remove --all option: it's the default
1 parent d27865c commit ee93a37

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/scala/scala/tools/partest/nest/ConsoleRunner.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ConsoleRunner(argstr: String) extends {
100100

101101
// Early return on no args, version, or invalid args
102102
if (optVersion) return echo(versionMsg)
103-
if ((argstr == "") || optHelp) return NestUI.usage()
103+
if (optHelp) return NestUI.usage()
104104

105105
val (individualTests, invalid) = parsed.residualArgs map (p => Path(p)) partition denotesTestPath
106106
if (invalid.nonEmpty) {
@@ -122,6 +122,7 @@ class ConsoleRunner(argstr: String) extends {
122122
val grepExpr = optGrep getOrElse ""
123123

124124
// If --grep is given we suck in every file it matches.
125+
// TODO: intersect results of grep with specified kinds, if any
125126
val greppedTests = if (grepExpr == "") Nil else {
126127
val paths = grepFor(grepExpr)
127128
if (paths.isEmpty)
@@ -136,9 +137,8 @@ class ConsoleRunner(argstr: String) extends {
136137

137138
val givenKinds = standardKinds.filter(kind => parsed.isSet("--" + kind))
138139
val kinds = (
139-
if (optAll) standardKinds
140-
else if (givenKinds.nonEmpty) givenKinds
141-
else if (invalid.isEmpty && miscTests.isEmpty && !isRerun) standardKinds // If no kinds, --grep, or individual tests were given, assume --all
140+
if (givenKinds.nonEmpty) givenKinds
141+
else if (miscTests.isEmpty) standardKinds // If no kinds, --grep, or individual tests were given, assume --all
142142
else Nil
143143
)
144144
val kindsTests = kinds flatMap testsFor

src/main/scala/scala/tools/partest/nest/ConsoleRunnerSpec.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ trait ConsoleRunnerSpec extends Spec with Meta.StdOpts with Interpolation {
88
def referenceSpec = ConsoleRunnerSpec
99
def programInfo = Spec.Info(
1010
"console-runner",
11-
"Usage: NestRunner [options] [test test ...]",
11+
"Usage: ConsoleRunner [options] [test test ...]",
1212
"scala.tools.partest.nest.ConsoleRunner")
1313

1414
heading("Test categories:")
15-
val optAll = "all" / "run all tests" --?
1615
val optPos = "pos" / "run compilation tests (success)" --?
1716
val optNeg = "neg" / "run compilation tests (failure)" --?
1817
val optRun = "run" / "run interpreter and backend tests" --?

0 commit comments

Comments
 (0)