Skip to content

Commit 6afd4b8

Browse files
committed
Accumulated changes. Added support for showing counts and details for diffs, and counts for misses.
- Legacy-Id: 430
1 parent 70f85c6 commit 6afd4b8

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

test/buildbot/master/ietfdb/buildbot_plugins.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class DjangoTest(ShellCommand):
1414
description = ["running django-test"]
1515
descriptionDone = ["django-test"]
1616
flunkOnFailure = False
17+
warnOnFailure = True
1718
flunkingIssues = ["exception", "failure"] # any pyflakes lines like this cause FAILURE
1819

19-
msgtypes = ("exceptions", "failures", "skipped", "diffs", "pass")
20+
msgtypes = ("exceptions", "failures", "missing", "skipped", "pass", "diffs", "diff")
2021

2122
def createSummary(self, log):
2223
summaries = {}
@@ -31,9 +32,8 @@ def count(m):
3132
for type in self.msgtypes:
3233
typelist[type] = set([])
3334

34-
first = True
3535
for line in StringIO(log.getText()).readlines():
36-
if re.search("^Traceback: ", line):
36+
if re.search("^Traceback ", line):
3737
m = "exception"
3838
typelist["exceptions"].add(m)
3939
count(m)
@@ -46,8 +46,12 @@ def count(m):
4646
typelist["skipped"].add(m)
4747
count(m)
4848
if re.search("^Diff: +.*", line):
49-
m = "diff_%s" % line.split()[1]
49+
m = "diffs"
50+
count(m)
51+
summaries[m] = []
5052
typelist["diffs"].add(m)
53+
m = "diff_%s" % line.split()[1]
54+
typelist["diff"].add(m)
5155
count(m)
5256
if re.search("^OK +.* ", line):
5357
m = "pass_%s" % line.split()[1]
@@ -57,6 +61,12 @@ def count(m):
5761
m = "pass_%s" % line.split()[1]
5862
typelist["pass"].add(m)
5963
count(m)
64+
if re.search("^Miss .*", line):
65+
m = "missing"
66+
typelist["missing"].add(m)
67+
count(m)
68+
if re.search("^Response count:", line):
69+
m = None
6070
if m:
6171
if not m in summaries:
6272
summaries[m] = []
@@ -66,7 +76,14 @@ def count(m):
6676
for type in self.msgtypes:
6777
for msg in typelist[type]:
6878
if counts[msg]:
69-
self.descriptionDone.append("%s=%d" % (msg, counts[msg]))
79+
if counts[msg] == 1 and msg.startswith("diff"):
80+
difflen = len(summaries[msg])
81+
if difflen >= 102:
82+
self.descriptionDone.append("%s (long)" % (msg))
83+
else:
84+
self.descriptionDone.append("%s&nbsp;(%s<i>l</i>)" % (msg, difflen))
85+
else:
86+
self.descriptionDone.append("%s=%d" % (msg, counts[msg]))
7087
self.addCompleteLog(msg, "".join(summaries[msg]))
7188
self.setProperty("urltest-%s" % type, sum([counts[msg] for msg in typelist[type]]))
7289
self.setProperty("urltest-total", sum([counts[msg] for msg in counts if msg not in typelist["pass"]]))

0 commit comments

Comments
 (0)