Conversation
…failure Python 3.12 (Jazzy) changed unittest to return exit code 5 when no tests are collected, while Python 3.10 (Humble) returns 0. The empty tests_require caused colcon to use the unittest runner, which never discovered any tests since the test classes don't inherit unittest.TestCase. The colcon pytest runner handles exit code 5 gracefully. Also add norecursedirs to prevent pytest from discovering simulator tests that require a real MORAI connection. Signed-off-by: Mete Fatih Cırıt <[email protected]>
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Contributor
Author
|
The tests have passed, could you review? |
mitsudome-r
approved these changes
Apr 2, 2026
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.
tests_requirefrom[]to["pytest"]so colcon uses the pytest runner instead of unittest[tool:pytest]withnorecursedirsto prevent pytest from discovering manual simulator testsWhy
The Jazzy CI is failing with exit code 5 on
simulator_compatibility_test.This package is a manual simulator compatibility test suite -- all tests require a running simulator (e.g. MORAI SIM: Drive) and human observation, as described in the README. It has never had automated CI tests, and no tests ran on Humble either:
The root cause is a chain of issues:
setup.pyhadtests_require=[], which made colcon select the unittest runner instead of pytest.unittest.TestCase(they're pytest-style), so unittest discovered 0 tests on both distros.The fix switches to the pytest runner by setting
tests_require=["pytest"]. The colcon pytest runner explicitly handles exit code 5 (NO_TESTS_COLLECTED) gracefully and does not propagate it as a failure.norecursedirsis needed because pytest has broader test discovery than unittest -- without it, pytest would find and attempt to run the manual simulator tests, which hang waiting for a simulator connection.Test plan