Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions launchable/commands/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,12 @@
help="get subset list from git managed files",
is_flag=True,
)
@click.option(
"--use-case",
"use_case",
type=click.Choice(["one-commit", "feature-branch", "recurring"]),
hidden=True, # control PTS v2 test selection behavior. Non-committed, so hidden for now.
)
@click.pass_context
def subset(
context: click.core.Context,
Expand Down Expand Up @@ -235,6 +241,7 @@ def subset(
prioritized_tests_mapping_file: Optional[TextIO] = None,
test_suite: Optional[str] = None,
is_get_tests_from_guess: bool = False,
use_case: Optional[str] = None,
):
app = context.obj
tracking_client = TrackingClient(Command.SUBSET, app=app)
Expand Down Expand Up @@ -513,6 +520,9 @@ def get_payload(
if prioritized_tests_mapping_file:
payload['prioritizedTestsMapping'] = json.load(prioritized_tests_mapping_file)

if use_case:
payload["changesUnderTest"] = use_case

return payload

def _collect_potential_test_files(self):
Expand Down
Loading