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:
parent
39ae72b4cb
commit
77837e8107
1 changed files with 6 additions and 2 deletions
|
@ -12,6 +12,7 @@ class Harness:
|
||||||
self.tests = {}
|
self.tests = {}
|
||||||
self.id = None
|
self.id = None
|
||||||
self.fail_on_fault = True
|
self.fail_on_fault = True
|
||||||
|
self.fault = False
|
||||||
|
|
||||||
def configure(self, instance):
|
def configure(self, instance):
|
||||||
config = instance.test.harness_config
|
config = instance.test.harness_config
|
||||||
|
@ -76,7 +77,10 @@ class Test(Harness):
|
||||||
self.tests[name] = match.group(1)
|
self.tests[name] = match.group(1)
|
||||||
|
|
||||||
if self.RUN_PASSED in line:
|
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:
|
if self.RUN_FAILED in line:
|
||||||
self.state = "failed"
|
self.state = "failed"
|
||||||
|
@ -84,5 +88,5 @@ class Test(Harness):
|
||||||
if self.fail_on_fault:
|
if self.fail_on_fault:
|
||||||
for fault in self.faults:
|
for fault in self.faults:
|
||||||
if fault in line:
|
if fault in line:
|
||||||
self.state = "failed"
|
self.fault = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue