Commit 2e4c7a2f authored by Marek Olšák's avatar Marek Olšák

core: add new status trap, abort, and crash printed as black lines in summary

To distiguish between 'fail' and unexpected termination.
Acked-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Acked-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Acked-by: default avatarChad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent 5fbe36a8
......@@ -74,7 +74,13 @@ class PlainExecTest(Test):
if 'result' not in results:
results['result'] = 'fail'
if proc.returncode != 0:
if proc.returncode == -5:
results['result'] = 'trap'
elif proc.returncode == -6:
results['result'] = 'abort'
elif proc.returncode == -11:
results['result'] = 'crash'
elif proc.returncode != 0:
results['result'] = 'fail'
results['note'] = 'Returncode was %d' % (proc.returncode)
......
......@@ -68,7 +68,14 @@ class GleanTest(Test):
out, err = glean.communicate()
results['result'] = 'pass'
if glean.returncode != 0 or out.find('FAIL') >= 0:
if glean.returncode == -5:
results['result'] = 'trap'
elif glean.returncode == -6:
results['result'] = 'abort'
elif glean.returncode == -11:
results['result'] = 'crash'
elif glean.returncode != 0 or out.find('FAIL') >= 0:
results['result'] = 'fail'
results['returncode'] = glean.returncode
......
......@@ -28,17 +28,23 @@ import core
##### Vector indicating the number of subtests that have passed/failed/etc.
#############################################################################
class PassVector:
def __init__(self, p, w, f, s):
def __init__(self, p, w, f, s, t, a, c):
self.passnr = p
self.warnnr = w
self.failnr = f
self.skipnr = s
self.trapnr = t
self.abortnr = a
self.crashnr = c
def add(self, o):
self.passnr += o.passnr
self.warnnr += o.warnnr
self.failnr += o.failnr
self.skipnr += o.skipnr
self.trapnr += o.trapnr
self.abortnr += o.abortnr
self.crashnr += o.crashnr
#############################################################################
......@@ -66,10 +72,13 @@ results is an array of TestResult instances, one per testrun
result.status = result['result']
vectormap = {
'pass': PassVector(1,0,0,0),
'warn': PassVector(0,1,0,0),
'fail': PassVector(0,0,1,0),
'skip': PassVector(0,0,0,1)
'pass': PassVector(1,0,0,0,0,0,0),
'warn': PassVector(0,1,0,0,0,0,0),
'fail': PassVector(0,0,1,0,0,0,0),
'skip': PassVector(0,0,0,1,0,0,0),
'trap': PassVector(0,0,0,0,1,0,0),
'abort': PassVector(0,0,0,0,0,1,0),
'crash': PassVector(0,0,0,0,0,0,1)
}
if result.status not in vectormap:
......@@ -106,7 +115,7 @@ results is an array of GroupResult instances, one per testrun
# Perform some initial annotations
for j in range(len(self.results)):
result = self.results[j]
result.passvector = PassVector(0, 0, 0, 0)
result.passvector = PassVector(0, 0, 0, 0, 0, 0, 0)
result.testrun = self.summary.testruns[j]
# Collect, create and annotate children
......
......@@ -156,9 +156,18 @@ def buildGroupSummaryTestrun(groupresult):
warnnr = groupresult.passvector.warnnr
failnr = groupresult.passvector.failnr
skipnr = groupresult.passvector.skipnr
totalnr = passnr + warnnr + failnr # do not count skips
if failnr > 0:
trapnr = groupresult.passvector.trapnr
abortnr = groupresult.passvector.abortnr
crashnr = groupresult.passvector.crashnr
totalnr = passnr + warnnr + failnr + trapnr + abortnr + crashnr # do not count skips
if trapnr > 0:
status = 'trap'
elif abortnr > 0:
status = 'abort'
elif crashnr > 0:
status = 'crash'
elif failnr > 0:
status = 'fail'
elif warnnr > 0:
status = 'warn'
......
......@@ -48,6 +48,12 @@ td {
background-color: #20ff20;
}
.trap, .abort, .crash {
text-align: right;
background-color: #000000;
color: #ffffff;
}
.skipa {
text-align: right;
background-color: #d0d0d0;
......@@ -68,6 +74,12 @@ td {
background-color: #50ff50;
}
.trapa, .aborta, .crasha {
text-align: right;
background-color: #141414;
color: #ffffff;
}
.skipb {
text-align: right;
background-color: #c0c0c0;
......@@ -87,3 +99,13 @@ td {
text-align: right;
background-color: #40ff40;
}
.trapb, .abortb, .crashb {
text-align: right;
background-color: #0a0a0a;
color: #ffffff;
}
td.trapa a, td.trapb a, td.aborta a, td.abortb a, td.crasha a, td.crashb a {
color: #ffffff;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment