commit e22a5afe554f89a422d008031db5b50d6dd9d709 parent c7522083b358be31f522b963620b64e1a3f6bef7 Author: Florian Quèze <florian@queze.net> Date: Thu, 18 Dec 2025 14:58:47 +0000 Bug 2006557 - Ensure mochitest test_status messages have a subtest field, r=ahal. Differential Revision: https://phabricator.services.mozilla.com/D276830 Diffstat:
| M | testing/mochitest/runtests.py | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py @@ -207,8 +207,10 @@ class MessageLogger: raise ValueError def _fix_subtest_name(self, message): - """Make sure subtest name is a string""" - if message.get("subtest") is not None: + """Ensure test_status messages have a subtest field and convert it to a string""" + if message.get("action") == "test_status" and "subtest" not in message: + message["subtest"] = None + elif message.get("subtest") is not None: message["subtest"] = str(message["subtest"]) def _fix_test_name(self, message):