Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twister: Allow sharing hardware platform between variants #81465

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gchwier
Copy link
Collaborator

@gchwier gchwier commented Nov 15, 2024

Extended hardware map to share a single board between variants. To run tests for different variants on the same board without re-configuring the hardware map file for each variant, one can extend the platform attribute with board names separated by commas.

Generate hardware map:
${ZEPHYR_BASE}/scripts/twister --generate-hardware-map hardware_map.yml

Update platform with two variants you want to use:

- connected: true
  id: '001050076605'
  platform: nrf5340dk/nrf5340/cpuapp, nrf5340dk/nrf5340/cpuapp/ns
  product: J-Link
  runner: nrfjprog
  serial: /dev/ttyACM1

Run tests:
./scripts/twister -T samples/hello_world --device-testing --hardware-map hardware_map.yml --west-flash=--recover -vv --no-clean -ll debug

DEBUG   - platform filter: ['nrf5340dk/nrf5340/cpuapp', 'nrf5340dk/nrf5340/cpuapp/ns']
...
| Board                       |           ID |   Counter |   Failures |
|-----------------------------|--------------|-----------|------------|
| nrf5340dk/nrf5340/cpuapp    | 001050076605 |         1 |          0 |
| nrf5340dk/nrf5340/cpuapp/ns | 001050076605 |         1 |          0 |

When test is run on a selected board, then all DUTs with same id are locked.

Extended hardware map to share a single board between variants.
To run tests for different variants on the same board
without re-configuring the hardware map file for each variant,
one can extend the `platform` attribute with board names separated by commas.

Signed-off-by: Grzegorz Chwierut <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants