mirror of https://github.com/sbt/sbt.git
Fix: always create TestDefinitions with correct explicitlySpecified value
Previously only created new TestDefinitions when explicitlyRequestedNames was non-empty, leaving uniqueTests with potentially incorrect explicitlySpecified values. Now always map to create new TestDefinitions with explicitlySpecified based on whether the test name is in explicitlyRequestedNames.
This commit is contained in:
parent
63c7271e87
commit
b4f0358f1e
|
|
@ -293,17 +293,14 @@ object Tests {
|
|||
val uniqueTests = distinctBy(tests)(_.name)
|
||||
// Per TaskDef: explicitlySpecified=true only when user supplied a complete FQN (e.g. testOnly com.example.MySuite),
|
||||
// not for patterns (testOnly *Spec) or plain "test". So only mark when test.name is in explicitlyRequestedNames.
|
||||
val testsToUse =
|
||||
if (explicitlyRequestedNames.isEmpty) uniqueTests
|
||||
else
|
||||
uniqueTests.map(t =>
|
||||
new TestDefinition(
|
||||
t.name,
|
||||
t.fingerprint,
|
||||
explicitlySpecified = explicitlyRequestedNames.contains(t.name),
|
||||
Array(new SuiteSelector: Selector)
|
||||
)
|
||||
)
|
||||
val testsToUse = uniqueTests.map(t =>
|
||||
new TestDefinition(
|
||||
t.name,
|
||||
t.fingerprint,
|
||||
explicitlySpecified = explicitlyRequestedNames.contains(t.name),
|
||||
Array(new SuiteSelector: Selector)
|
||||
)
|
||||
)
|
||||
new ProcessedOptions(
|
||||
testsToUse.toVector,
|
||||
setup.toVector,
|
||||
|
|
|
|||
Loading…
Reference in New Issue