From 6afd4b826f70b47a73672043a3a3414763c039ed Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 16 Jun 2007 14:22:52 +0000 Subject: [PATCH] Accumulated changes. Added support for showing counts and details for diffs, and counts for misses. - Legacy-Id: 430 --- .../master/ietfdb/buildbot_plugins.py | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test/buildbot/master/ietfdb/buildbot_plugins.py b/test/buildbot/master/ietfdb/buildbot_plugins.py index bea46cabd..649ce6516 100644 --- a/test/buildbot/master/ietfdb/buildbot_plugins.py +++ b/test/buildbot/master/ietfdb/buildbot_plugins.py @@ -14,9 +14,10 @@ class DjangoTest(ShellCommand): description = ["running django-test"] descriptionDone = ["django-test"] flunkOnFailure = False + warnOnFailure = True flunkingIssues = ["exception", "failure"] # any pyflakes lines like this cause FAILURE - msgtypes = ("exceptions", "failures", "skipped", "diffs", "pass") + msgtypes = ("exceptions", "failures", "missing", "skipped", "pass", "diffs", "diff") def createSummary(self, log): summaries = {} @@ -31,9 +32,8 @@ class DjangoTest(ShellCommand): for type in self.msgtypes: typelist[type] = set([]) - first = True for line in StringIO(log.getText()).readlines(): - if re.search("^Traceback: ", line): + if re.search("^Traceback ", line): m = "exception" typelist["exceptions"].add(m) count(m) @@ -46,8 +46,12 @@ class DjangoTest(ShellCommand): typelist["skipped"].add(m) count(m) if re.search("^Diff: +.*", line): - m = "diff_%s" % line.split()[1] + m = "diffs" + count(m) + summaries[m] = [] typelist["diffs"].add(m) + m = "diff_%s" % line.split()[1] + typelist["diff"].add(m) count(m) if re.search("^OK +.* ", line): m = "pass_%s" % line.split()[1] @@ -57,6 +61,12 @@ class DjangoTest(ShellCommand): m = "pass_%s" % line.split()[1] typelist["pass"].add(m) count(m) + if re.search("^Miss .*", line): + m = "missing" + typelist["missing"].add(m) + count(m) + if re.search("^Response count:", line): + m = None if m: if not m in summaries: summaries[m] = [] @@ -66,7 +76,14 @@ class DjangoTest(ShellCommand): for type in self.msgtypes: for msg in typelist[type]: if counts[msg]: - self.descriptionDone.append("%s=%d" % (msg, counts[msg])) + if counts[msg] == 1 and msg.startswith("diff"): + difflen = len(summaries[msg]) + if difflen >= 102: + self.descriptionDone.append("%s (long)" % (msg)) + else: + self.descriptionDone.append("%s (%sl)" % (msg, difflen)) + else: + self.descriptionDone.append("%s=%d" % (msg, counts[msg])) self.addCompleteLog(msg, "".join(summaries[msg])) self.setProperty("urltest-%s" % type, sum([counts[msg] for msg in typelist[type]])) self.setProperty("urltest-total", sum([counts[msg] for msg in counts if msg not in typelist["pass"]]))