Commit 629e71d1 authored by Kenneth Graunke's avatar Kenneth Graunke

framework: Remove 'abort' and 'trap' results in favor of 'crash'.

While distinguishing between 'fail' and 'crash' in extremely useful,
I've never encountered a situation where 'abort' or 'trap' offers more
insight than simply calling it a 'crash'.

We may as well simplify things a bit.
Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Acked-by: Marek Olšák's avatarMarek Olšák <maraeo@gmail.com>
parent 3c16fb93
......@@ -85,19 +85,21 @@ class ExecTest(Test):
results['result'] = 'fail'
out = self.interpretResult(out, results)
if proc.returncode == -5:
results['result'] = 'trap'
elif proc.returncode == -6:
results['result'] = 'abort'
elif proc.returncode in (-8, -10, -11):
results['result'] = 'crash'
elif proc.returncode == -1073741819:
# 0xc0000005
# Windows EXCEPTION_ACCESS_VIOLATION
results['result'] = 'crash'
elif proc.returncode == -1073741676:
# 0xc0000094
# Windows EXCEPTION_INT_DIVIDE_BY_ZERO
crash_codes = [
# Unix: terminated by a signal
-5, # SIGTRAP
-6, # SIGABRT
-8, # SIGFPE (Floating point exception)
-10, # SIGUSR1
-11, # SIGSEGV (Segmentation fault)
# Windows:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005):
-1073741819,
# EXCEPTION_INT_DIVIDE_BY_ZERO (0xc0000094):
-1073741676
]
if proc.returncode in crash_codes:
results['result'] = 'crash'
elif proc.returncode != 0:
results['note'] = 'Returncode was %d' % (proc.returncode)
......
......@@ -27,13 +27,11 @@ import core
##### Vector indicating the number of subtests that have passed/failed/etc.
#############################################################################
class PassVector:
def __init__(self, p, w, f, s, t, a, c):
def __init__(self, p, w, f, s, 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):
......@@ -41,8 +39,6 @@ class PassVector:
self.warnnr += o.warnnr
self.failnr += o.failnr
self.skipnr += o.skipnr
self.trapnr += o.trapnr
self.abortnr += o.abortnr
self.crashnr += o.crashnr
......@@ -82,13 +78,11 @@ results is an array of TestResult instances, one per testrun
result.status = result['result']
vectormap = {
'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)
'pass': PassVector(1,0,0,0,0),
'warn': PassVector(0,1,0,0,0),
'fail': PassVector(0,0,1,0,0),
'skip': PassVector(0,0,0,1,0),
'crash': PassVector(0,0,0,0,1)
}
if result.status not in vectormap:
......@@ -131,7 +125,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, 0, 0, 0)
result.passvector = PassVector(0, 0, 0, 0, 0)
result.testrun = self.summary.testruns[j]
# Collect, create and annotate children
......
......@@ -173,16 +173,10 @@ def buildGroupSummaryTestrun(groupresult):
warnnr = groupresult.passvector.warnnr
failnr = groupresult.passvector.failnr
skipnr = groupresult.passvector.skipnr
trapnr = groupresult.passvector.trapnr
abortnr = groupresult.passvector.abortnr
crashnr = groupresult.passvector.crashnr
totalnr = passnr + warnnr + failnr + trapnr + abortnr + crashnr # do not count skips
totalnr = passnr + warnnr + failnr + crashnr # do not count skips
if trapnr > 0:
status = 'trap'
elif abortnr > 0:
status = 'abort'
elif crashnr > 0:
if crashnr > 0:
status = 'crash'
elif failnr > 0:
status = 'fail'
......
......@@ -48,7 +48,7 @@ td {
background-color: #20ff20;
}
.trap, .abort, .crash {
.crash {
text-align: right;
background-color: #000000;
color: #ffffff;
......@@ -74,7 +74,7 @@ td {
background-color: #50ff50;
}
.trapa, .aborta, .crasha {
.crasha {
text-align: right;
background-color: #141414;
color: #ffffff;
......@@ -100,12 +100,12 @@ td {
background-color: #40ff40;
}
.trapb, .abortb, .crashb {
.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 {
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