From 553448d5f8da0dfbf242a4ee845a6b11ac0c0c0c Mon Sep 17 00:00:00 2001 From: Amy Tseng Date: Thu, 25 Dec 2025 02:01:22 +0800 Subject: [PATCH] fix: ensure non-zero exit code on TestAbortAll (#960) --- mobly/test_runner.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mobly/test_runner.py b/mobly/test_runner.py index b32f5b0f..178d5863 100644 --- a/mobly/test_runner.py +++ b/mobly/test_runner.py @@ -79,9 +79,10 @@ def main(argv=None): runner.run() ok = runner.results.is_all_pass and ok except signals.TestAbortAll: - pass + ok = False + logging.error('Test run aborted by TestAbortAll.') except Exception: - logging.exception('Exception when executing %s.', config.testbed_name) + logging.exception('Exception when executing %s.', config.test_bed_name) ok = False if not ok: sys.exit(1)