From e24713580511db63ea4071d80d90a3d49e16e40a Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Tue, 28 May 2024 14:50:57 -0500 Subject: [PATCH] Fixed test.py crashing on malformed test ids Sometimes, if test_runner errors before running any tests, the last test id can end up being None. This broke test output writing, which expected to be able to parse an id. Instead we should just ignore the malformed id (it's not like we can write anything relevant about any tests here), and report it to the user at a higher level. --- scripts/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.py b/scripts/test.py index bbce9a17..2cc4f898 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -1085,7 +1085,7 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args): except TestFailure as failure: # keep track of failures - if output_: + if output_ and failure.id is not None: case, _ = failure.id.split(':', 1) suite = case_suites[case] # get defines and write to csv