diff --git a/tools/harness-automation/autothreadharness/runner.py b/tools/harness-automation/autothreadharness/runner.py index 036c9b79d..2b2c60a1d 100644 --- a/tools/harness-automation/autothreadharness/runner.py +++ b/tools/harness-automation/autothreadharness/runner.py @@ -106,10 +106,14 @@ class SimpleTestResult(unittest.TestResult): test (TestCase): The test just run passed (bool): Whether the case is passed """ + fails = self.result.get(test.__class__.__name__, {}).get('fails', 0) + if passed is False: + fails += 1 self.result[str(test.__class__.__name__)] = { 'started': self.started, 'stopped': time.strftime('%Y-%m-%dT%H:%M:%S'), 'passed': passed, + 'fails': fails, 'error': error, 'executions': SimpleTestResult.executions, }