-
Notifications
You must be signed in to change notification settings - Fork 207
fix: ensure non-zero exit code on TestAbortAll (#960) #997
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
base: master
Are you sure you want to change the base?
fix: ensure non-zero exit code on TestAbortAll (#960) #997
Conversation
xpconanfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a corresponding unit test
xpconanfan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's stay consistent with the next block in terms of the order between the two lines
|
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 |
| expected_info_dict['Controller Info'], info.controller_info | ||
| ) | ||
|
|
||
| def test_main_exits_with_error_on_test_abort_all(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this test next to the other test_main_* tests and try to maintain a reasonable order
Ensures that Mobly returns a non-zero exit code when
TestAbortAllis raised,preventing CI/CD systems from incorrectly reporting success.
Fixes #960