[jhbuild] [buildbot] correct display of 'Failed checks' cells
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] [buildbot] correct display of 'Failed checks' cells
- Date: Tue, 5 May 2009 17:17:33 -0400 (EDT)
commit 104e1e060b1a763ac0febaa901aa957722ee9445
Author: Frederic Peters <fpeters 0d be>
Date: Tue May 5 21:11:03 2009 +0200
[buildbot] correct display of 'Failed checks' cells
As the number of steps is now variable, the check build step position
can no longer be hardcoded, as it could be in another position, or not
exist at all.
---
jhbuild/buildbot/status/web/__init__.py | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/jhbuild/buildbot/status/web/__init__.py b/jhbuild/buildbot/status/web/__init__.py
index fe5fb9d..9936716 100644
--- a/jhbuild/buildbot/status/web/__init__.py
+++ b/jhbuild/buildbot/status/web/__init__.py
@@ -124,10 +124,13 @@ class ProjectsSummary(HtmlResource):
if last_build:
# use a different class/label if make check failed
steps = last_build.getSteps()
- if steps and steps[2].results == WARNINGS:
- # make check failed
- class_ = 'failedchecks'
- lastbuild_label = 'Failed Checks'
+ for step in reversed(steps):
+ if step.name.split()[-1] == 'check':
+ if step.results == WARNINGS:
+ # make check failed
+ class_ = 'failedchecks'
+ lastbuild_label = 'Failed Checks'
+ break
elif lastbuild == 'failed':
lastbuild_label = 'Failed'
last_build = builder.getLastFinishedBuild()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]