sanitycheck: do not abort logging on faults

We have been dropping lines after finding a fault which resulted in
missing information in the log. Make sure we continue and only report
failure at the end of the execution.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-08-29 10:05:27 -04:00
commit 77837e8107

View file

@ -12,6 +12,7 @@ class Harness:
self.tests = {}
self.id = None
self.fail_on_fault = True
self.fault = False
def configure(self, instance):
config = instance.test.harness_config
@ -76,7 +77,10 @@ class Test(Harness):
self.tests[name] = match.group(1)
if self.RUN_PASSED in line:
self.state = "passed"
if self.fault:
self.state = "failed"
else:
self.state = "passed"
if self.RUN_FAILED in line:
self.state = "failed"
@ -84,5 +88,5 @@ class Test(Harness):
if self.fail_on_fault:
for fault in self.faults:
if fault in line:
self.state = "failed"
self.fault = True