Skip to content

Commit

Permalink
set exit_code default value as -1
Browse files Browse the repository at this point in the history
  • Loading branch information
LiliDeng committed Feb 11, 2023
1 parent e046fa4 commit 3b47e0b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lisa/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class RootRunner(Action):

def __init__(self, runbook_builder: RunbookBuilder) -> None:
super().__init__()
self.exit_code: int = 0
self.exit_code: int = -1

self._runbook_builder = runbook_builder

Expand Down Expand Up @@ -236,9 +236,8 @@ async def start(self) -> None:
self.exit_code = sum(
1 for x in results if x.status == TestStatus.FAILED
)
else:
# unknown error happened, see exception log for details.
self.exit_code = -1
else:
self.exit_code = 0

async def stop(self) -> None:
await super().stop()
Expand Down

0 comments on commit 3b47e0b

Please sign in to comment.