fix: ensure non-zero exit code on TestAbortAll (#960)#997
Open
amytsengtw wants to merge 4 commits intogoogle:masterfrom
Open
fix: ensure non-zero exit code on TestAbortAll (#960)#997amytsengtw wants to merge 4 commits intogoogle:masterfrom
amytsengtw wants to merge 4 commits intogoogle:masterfrom
Conversation
xpconanfan
requested changes
Jan 7, 2026
Collaborator
xpconanfan
left a comment
There was a problem hiding this comment.
please add a corresponding unit test
xpconanfan
reviewed
Jan 12, 2026
xpconanfan
requested changes
Jan 13, 2026
Collaborator
xpconanfan
left a comment
There was a problem hiding this comment.
Please add a test for this scenario
There are other tests in test_runner_test already
mobly/test_runner.py
Outdated
| ok = runner.results.is_all_pass and ok | ||
| except signals.TestAbortAll: | ||
| pass | ||
| ok = False |
Collaborator
There was a problem hiding this comment.
let's stay consistent with the next block in terms of the order between the two lines
Contributor
Author
|
Fixed the testbed_name typo and added a self-contained unit test test_main_exits_with_error_on_test_abort_all. The test now creates its own temporary config to verify the exit code when signals.TestAbortAll is raised. Ready for another review |
xpconanfan
reviewed
Jan 14, 2026
| expected_info_dict['Controller Info'], info.controller_info | ||
| ) | ||
|
|
||
| def test_main_exits_with_error_on_test_abort_all(self): |
Collaborator
There was a problem hiding this comment.
move this test next to the other test_main_* tests and try to maintain a reasonable order
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.
Ensures that Mobly returns a non-zero exit code when
TestAbortAllis raised,preventing CI/CD systems from incorrectly reporting success.
Fixes #960