Skip to content

twister --generate-map is broken #41066

@erwango

Description

@erwango

Describe the bug
Following merge of #38656,
twister --generate-hardware-map is broken

$ twister --generate-hardware-map ../map.yml
Traceback (most recent call last):
  File "/local/mcu/zephyrproject/zephyr/scripts/twister", line 1357, in <module>
    main()
  File "/local/mcu/zephyrproject/zephyr/scripts/twister", line 782, in main
    options = parse_arguments()
  File "/local/mcu/zephyrproject/zephyr/scripts/twister", line 352, in parse_arguments
    """)
  File "/usr/lib/python3.6/argparse.py", line 1361, in add_argument
    return self._add_action(action)
  File "/usr/lib/python3.6/argparse.py", line 1584, in _add_action
    raise ValueError(msg)
ValueError: mutually exclusive arguments must be optional

Reverting #38656 makes it works again:

$ twister --generate-hardware-map ../map.yml
Renaming output directory to /local/mcu/zephyrproject/zephyr/twister-out.33
INFO    - Scanning connected hardware...
WARNING - Unsupported device (None): /dev/ttyS4 - n/a
INFO    - Detected devices:

| Platform   | ID                       | Serial device   |
|------------|--------------------------|-----------------|
| unknown    | 066AFF555654725187084757 | /dev/ttyACM0    |

To Reproduce
$ twister --generate-hardware-map ../map.yml

Expected behavior
A clear and concise description of what you expected to happen.

Impact
Blocking test bench

Logs and console output
If applicable, add console logs or other types of debug information
e.g Wireshark capture or Logic analyzer capture (upload in zip archive).
copy-and-paste text and put a code fence (```) before and after, to help
explain the issue. (if unable to obtain text log, add a screenshot)

Environment (please complete the following information):

  • OS: Linux
  • Toolchain (e.g Zephyr SDK, ...): SDK V0.13.1
  • Commit SHA or Version used: v2.7.99-2314-g02d1fd9ad7

Metadata

Metadata

Assignees

Labels

RegressionSomething, which was working, does not anymorebugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions