jhbuild r2254 - in trunk: . buildbot/public_html jhbuild/buildbot/status/web



Author: fpeters
Date: Fri Aug 15 20:26:10 2008
New Revision: 2254
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2254&view=rev

Log:
* jhbuild/buildbot/status/web/__init__.py,
buildbot/public_html/lgo.css: paint failures in 'make check' as orange.



Modified:
   trunk/ChangeLog
   trunk/buildbot/public_html/lgo.css
   trunk/jhbuild/buildbot/status/web/__init__.py

Modified: trunk/buildbot/public_html/lgo.css
==============================================================================
--- trunk/buildbot/public_html/lgo.css	(original)
+++ trunk/buildbot/public_html/lgo.css	Fri Aug 15 20:26:10 2008
@@ -249,6 +249,9 @@
 	color: #000;
 	background: #f88;
 }
+td.failedchecks {
+	background: #fa4;
+}
 
 
 /* From classic */

Modified: trunk/jhbuild/buildbot/status/web/__init__.py
==============================================================================
--- trunk/jhbuild/buildbot/status/web/__init__.py	(original)
+++ trunk/jhbuild/buildbot/status/web/__init__.py	Fri Aug 15 20:26:10 2008
@@ -18,8 +18,12 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 import os
+
 from twisted.web import server, static, resource
 from buildbot.status.web.base import HtmlResource, ITopBox, build_get_class
+from buildbot import interfaces, util
+from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
+
 
 def content(self, request):
     """
@@ -94,17 +98,33 @@
                 box = ITopBox(builder).getBox(request)
                 lastbuild = ''
                 for bt in box.text:
-                    if bt == "successful" or bt == "failed":
+                    if bt == 'successful' or bt == 'failed':
                         lastbuild = bt
-                if lastbuild == "successful" or lastbuild == "failed":
+
+                if lastbuild == 'successful':
                     class_ = build_get_class(builder.getLastFinishedBuild())
+                    lastbuild_label = 'Success'
+                elif lastbuild == 'failed':
+                    lastbuild_label = 'Failed'
+                    last_build = builder.getLastFinishedBuild()
+                    class_ = build_get_class(last_build)
+                    if last_build:
+                        # use a different class/label if the failure is
+                        # 'make check'
+                        steps = last_build.getSteps()
+                        if steps and steps[-1].results == FAILURE and \
+                                steps[-1].text[0].endswith(' check'):
+                            # make check failed
+                            class_ = 'failedchecks'
+                            lastbuild_label = 'Failed Checks'
                 else:
                     class_ = ''
+                    lastbuild_label = lastbuild
                 state, builds = builder.getState()
                 if state == 'building':
                     result += '<td class="%s">%s</td>' % (state, state)
                 else:
-                    result += '<td class="%s">%s</td>' % (class_, lastbuild)
+                    result += '<td class="%s">%s</td>' % (class_, lastbuild_label)
                 
                 if lastbuild in ('failed', 'successful'):
                     slave_results[slave][1] += 1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]