Skip to content

Commit

Permalink
[chiptool.py] Make sure to update the exit code properly if parsing f…
Browse files Browse the repository at this point in the history
…ails (#26539)
  • Loading branch information
vivien-apple authored and pull[bot] committed Jun 6, 2023
1 parent f555aef commit 2215904
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, config: TestParserBuilderConfig = TestParserBuilderConfig()):
self.__tests = copy.copy(config.tests)
self.__config = config
self.__duration = 0
self.__done = False
self.done = False

def __iter__(self):
self.__config.hooks.start(len(self.__tests))
Expand All @@ -76,9 +76,9 @@ def __next__(self):
if len(self.__tests):
return self.__get_test_parser(self.__tests.pop(0))

if not self.__done:
if not self.done:
self.__config.hooks.stop(round(self.__duration))
self.__done = True
self.done = True

raise StopIteration

Expand Down
2 changes: 1 addition & 1 deletion scripts/py_matter_yamltests/matter_yamltests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def run(self, parser_builder_config: TestParserBuilderConfig, runner_config: Tes
duration = round((time.time() - start) * 1000)
runner_config.hooks.stop(duration)

return True
return parser_builder.done

async def _run(self, parser: TestParser, config: TestRunnerConfig):
status = True
Expand Down

0 comments on commit 2215904

Please sign in to comment.