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.
This commit is contained in:
Christopher Haster
2024-05-28 14:50:57 -05:00
parent 223ebc768f
commit e247135805

View File

@@ -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