commit 7479d8079bb64b39e7560c749045e4890f0e72f1 parent 28417f546639940b4ded8dfdf0aa640c45b9011b 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):