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:
parent
6e6f13c18a
commit
f16e92c000
2 changed files with 9 additions and 0 deletions
|
@ -41,6 +41,7 @@ class Harness:
|
||||||
class Console(Harness):
|
class Console(Harness):
|
||||||
|
|
||||||
def handle(self, line):
|
def handle(self, line):
|
||||||
|
|
||||||
if self.type == "one_line":
|
if self.type == "one_line":
|
||||||
pattern = re.compile(self.regex[0])
|
pattern = re.compile(self.regex[0])
|
||||||
if pattern.search(line):
|
if pattern.search(line):
|
||||||
|
@ -78,6 +79,11 @@ class Console(Harness):
|
||||||
elif self.GCOV_END in line:
|
elif self.GCOV_END in line:
|
||||||
self.capture_coverage = False
|
self.capture_coverage = False
|
||||||
|
|
||||||
|
if self.state == "passed":
|
||||||
|
self.tests[self.id] = "PASS"
|
||||||
|
else:
|
||||||
|
self.tests[self.id] = "FAIL"
|
||||||
|
|
||||||
class Test(Harness):
|
class Test(Harness):
|
||||||
RUN_PASSED = "PROJECT EXECUTION SUCCESSFUL"
|
RUN_PASSED = "PROJECT EXECUTION SUCCESSFUL"
|
||||||
RUN_FAILED = "PROJECT EXECUTION FAILED"
|
RUN_FAILED = "PROJECT EXECUTION FAILED"
|
||||||
|
|
|
@ -1776,6 +1776,9 @@ class TestCase:
|
||||||
name = "{}.{}".format(self.id, sub)
|
name = "{}.{}".format(self.id, sub)
|
||||||
self.cases.append(name)
|
self.cases.append(name)
|
||||||
|
|
||||||
|
if not results:
|
||||||
|
self.cases.append(self.id)
|
||||||
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue