remote/client: support OpenOCD bootstrap without environment#1864
Open
ozan956 wants to merge 1 commit intolabgrid-project:masterfrom
Open
remote/client: support OpenOCD bootstrap without environment#1864ozan956 wants to merge 1 commit intolabgrid-project:masterfrom
ozan956 wants to merge 1 commit intolabgrid-project:masterfrom
Conversation
The bootstrap fallback path was too narrow for OpenOCD-based setups without a local environment. So far, `labgrid-client bootstrap` only auto-created `OpenOCDDriver` for `NetworkAlteraUSBBlaster`. If a place exposed only `NetworkUSBDebugger`, the client failed with "target has no compatible resource available" even though `OpenOCDDriver` can bind to that resource type. In addition, the existing `bootstrap_args` path only handled raw `key=value` strings. This was not sufficient for `OpenOCDDriver` arguments such as `load_commands`, `search`, or `config`, which often need structured values like lists. Extend the bootstrap fallback to `NetworkUSBDebugger` and parse bootstrap driver arguments as YAML values. This allows CLI-only OpenOCD bootstrap flows to pass structured driver arguments without requiring a local environment file. Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
4800392 to
91725b3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1864 +/- ##
========================================
- Coverage 45.8% 45.7% -0.1%
========================================
Files 182 182
Lines 14720 14733 +13
========================================
+ Hits 6743 6745 +2
- Misses 7977 7988 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bootstrap fallback path was too narrow for OpenOCD-based setups without a
local environment.
Previously,
labgrid-client bootstraponly auto-createdOpenOCDDriverforNetworkAlteraUSBBlaster. If a place exposed onlyNetworkUSBDebugger, theclient still failed with
target has no compatible resource availableeventhough
OpenOCDDrivercan bind to that resource type.The existing
bootstrap_argspath was also too limited. It only handled rawkey=valuestrings, which was not sufficient forOpenOCDDriverargumentssuch as
load_commands,search, orconfig, where structured values likelists are often required.
This change:
NetworkUSBDebuggerThis makes CLI-only OpenOCD bootstrap flows usable in more cases without
requiring a local environment file.
I verified the change with focused regression tests:
pytest -q tests/test_client.py -k 'bootstrap_network_usb_debugger or bootstrap_openocd_args'Checklist