From 77837e810705bdb5ebfd3d17f47e3485ce49f9d4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Wed, 29 Aug 2018 10:05:27 -0400 Subject: [PATCH] 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 --- scripts/sanity_chk/harness.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/sanity_chk/harness.py b/scripts/sanity_chk/harness.py index fd40770ded7..ff0c78e1d68 100644 --- a/scripts/sanity_chk/harness.py +++ b/scripts/sanity_chk/harness.py @@ -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