Skip to content

Commit 77837e8

Browse files
committed
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 <[email protected]>
1 parent 39ae72b commit 77837e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/sanity_chk/harness.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def __init__(self):
1212
self.tests = {}
1313
self.id = None
1414
self.fail_on_fault = True
15+
self.fault = False
1516

1617
def configure(self, instance):
1718
config = instance.test.harness_config
@@ -76,13 +77,16 @@ def handle(self, line):
7677
self.tests[name] = match.group(1)
7778

7879
if self.RUN_PASSED in line:
79-
self.state = "passed"
80+
if self.fault:
81+
self.state = "failed"
82+
else:
83+
self.state = "passed"
8084

8185
if self.RUN_FAILED in line:
8286
self.state = "failed"
8387

8488
if self.fail_on_fault:
8589
for fault in self.faults:
8690
if fault in line:
87-
self.state = "failed"
91+
self.fault = True
8892

0 commit comments

Comments
 (0)