tests: add 'CHANGED' output to pickle viewer
Change-Id: I64c69fde8657c273adea69122877c5348a4f867a Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
parent
1088003135
commit
53ae19bb5d
1 changed files with 14 additions and 2 deletions
|
@ -115,6 +115,9 @@ class TestResult(object):
|
||||||
def skipped(self):
|
def skipped(self):
|
||||||
return all([ r.skipped() for r in self.results])
|
return all([ r.skipped() for r in self.results])
|
||||||
|
|
||||||
|
def changed(self):
|
||||||
|
return self.results[0].success() and self.failed()
|
||||||
|
|
||||||
def failed(self):
|
def failed(self):
|
||||||
return any([ not r for r in self.results])
|
return any([ not r for r in self.results])
|
||||||
|
|
||||||
|
@ -178,11 +181,20 @@ class TextSummary(ResultFormatter):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super(TextSummary, self).__init__(**kwargs)
|
super(TextSummary, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
def test_status(self, suite):
|
||||||
|
if suite.skipped():
|
||||||
|
return "SKIPPED"
|
||||||
|
elif suite.changed():
|
||||||
|
return "CHANGED"
|
||||||
|
elif suite:
|
||||||
|
return "OK"
|
||||||
|
else:
|
||||||
|
return "FAILED"
|
||||||
|
|
||||||
def dump_suites(self, suites):
|
def dump_suites(self, suites):
|
||||||
fout = self.fout
|
fout = self.fout
|
||||||
for suite in suites:
|
for suite in suites:
|
||||||
status = "SKIPPED" if suite.skipped() else \
|
status = self.test_status(suite)
|
||||||
("OK" if suite else "FAILED")
|
|
||||||
print >> fout, "%s: %s" % (suite.name, status)
|
print >> fout, "%s: %s" % (suite.name, status)
|
||||||
|
|
||||||
class JUnit(ResultFormatter):
|
class JUnit(ResultFormatter):
|
||||||
|
|
Loading…
Reference in a new issue