sanitycheck: count samples in reports

We have not been counting samples in reports. This change lists tests
associated with sample code which in many cases is just verifying output
from the sample and counts as 1 test.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-03-31 16:58:12 -04:00
commit f16e92c000
2 changed files with 9 additions and 0 deletions

View file

@ -41,6 +41,7 @@ class Harness:
class Console(Harness):
def handle(self, line):
if self.type == "one_line":
pattern = re.compile(self.regex[0])
if pattern.search(line):
@ -78,6 +79,11 @@ class Console(Harness):
elif self.GCOV_END in line:
self.capture_coverage = False
if self.state == "passed":
self.tests[self.id] = "PASS"
else:
self.tests[self.id] = "FAIL"
class Test(Harness):
RUN_PASSED = "PROJECT EXECUTION SUCCESSFUL"
RUN_FAILED = "PROJECT EXECUTION FAILED"

View file

@ -1776,6 +1776,9 @@ class TestCase:
name = "{}.{}".format(self.id, sub)
self.cases.append(name)
if not results:
self.cases.append(self.id)
def __str__(self):
return self.name