Skip to content

Reject unsupported connection modes in command-line arguments - #2100

Open
Solarboaters wants to merge 1 commit into
pyocd:developfrom
Solarboaters:fix/connect-mode-validation
Open

Solarboaters wants to merge 1 commit into
pyocd:developfrom
Solarboaters:fix/connect-mode-validation

Conversation

@Solarboaters

Copy link
Copy Markdown

Reject invalid --connect/-M values during argument parsing, instead of silently accepting a typo such as under_reset. The diagnostic lists the four supported connection modes.

Fixes #1030.

Validation: the reported typo and asdf were accepted on the original revision across all eight affected subcommands (16 failing regression cases). With the change, all 97 command-line tests pass, including each supported mode, its short option, and the unchanged default. The complete unit suite passes: 1,131 passed, 41 skipped. Critical-error lint and git diff --check pass.

Tested with Python 3.12 on Linux. These tests exercise the actual command-line parser; no debug probe or target hardware was used.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant