Skip to content
New issue

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

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

Already on GitHub? # to your account

tools/mavgen.py can silently fail if an enum definition is missing #862

Closed
nexton-winjeel opened this issue Oct 5, 2023 · 1 comment
Closed

Comments

@nexton-winjeel
Copy link
Contributor

nexton-winjeel commented Oct 5, 2023

Running mavgen.py in our CI tool can report success even if the generation fails. In this particular case, we had a message defined, but the associated enum was missing.

  • Using master at: 19e385c
  • Using Python v3.8
(venv) nexton@laptop:~/Repositories/mavlink$ python --version
Python 3.8.10
(venv) nexton@laptop:~/Repositories/mavlink$ ./pymavlink/tools/mavgen.py --output ./build --lang C --wire-protocol 2.0 message_definitions/v1.0/all.xml
Validating message_definitions/v1.0/all.xml
Parsing message_definitions/v1.0/all.xml
[...]
Parsing /home/nexton/Repositories/mavlink/message_definitions/v1.0/cubepilot.xml
Validating /home/nexton/Repositories/mavlink/message_definitions/v1.0/csAirLink.xml
Parsing /home/nexton/Repositories/mavlink/message_definitions/v1.0/csAirLink.xml
Merged enum MAV_CMD
[...]
Merged enum MAV_CMD
Enum ESC_FAILURE_FLAGS in ESC_INFO.failure_flags does not exist
(venv) nexton@laptop:~/Repositories/mavlink$ echo $?
0
@nexton-winjeel
Copy link
Contributor Author

Fixed in #863.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant