[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Thu Jun 12 15:52:51 MDT 2014


The branch, master has been updated
       via  4a37365 Add --debug-storm option.
       via  b55c89d Simplify handling of old build limit showing.
      from  242950a Add some notes on running the build farm locally to README.

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4a37365dc220a84e952c8214cf3b9acfcafe746a
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Thu Jun 12 23:52:42 2014 +0200

    Add --debug-storm option.

commit b55c89d354e616f00ebcf5d6a31f86688a2a8765
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Jun 7 18:32:33 2014 +0200

    Simplify handling of old build limit showing.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/web/__init__.py |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index 08d577a..438d412 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # This CGI script presents the results of the build_farm build
 
-# Copyright (C) Jelmer Vernooij <jelmer at samba.org>     2010
+# Copyright (C) Jelmer Vernooij <jelmer at samba.org>     2010-2014
 # Copyright (C) Matthieu Patou <mat at matws.net>         2010-2012
 #
 # Based on the original web/build.pl:
@@ -33,6 +33,7 @@
 
 from collections import defaultdict
 import os
+import sys
 
 from buildfarm import (
     hostdb,
@@ -125,7 +126,8 @@ def build_uri(myself, build):
 
 
 def build_link(myself, build):
-    return "<a href='%s'>%s</a>" % (build_uri(myself, build), html_build_status(build.status()))
+    return "<a href='%s'>%s</a>" % (
+        build_uri(myself, build), html_build_status(build.status()))
 
 
 def tree_uri(myself, tree):
@@ -134,7 +136,8 @@ def tree_uri(myself, tree):
 
 def tree_link(myself, tree):
     """return a link to a particular tree"""
-    return "<a href='%s' title='View recent builds for %s'>%s:%s</a>" % (tree_uri(myself, tree), tree.name, tree.name, tree.branch)
+    return "<a href='%s' title='View recent builds for %s'>%s:%s</a>" % (
+        tree_uri(myself, tree), tree.name, tree.name, tree.branch)
 
 
 def host_uri(myself, host):
@@ -404,7 +407,7 @@ class BuildFarmPage(object):
 
 class ViewBuildPage(BuildFarmPage):
 
-    def show_oldrevs(self, myself, build, host, compiler, limit):
+    def show_oldrevs(self, myself, build, host, compiler, limit=None):
         """show the available old revisions, if any"""
 
         tree = build.tree
@@ -419,11 +422,7 @@ class ViewBuildPage(BuildFarmPage):
         yield "<thead><tr><th>Revision</th><th>Status</th><th>Age</th></tr></thead>\n"
         yield "<tbody>\n"
 
-        nb = 0
-        for old_build in old_builds:
-            if limit >= 0 and nb >= limit:
-                break
-            nb = nb + 1
+        for old_build in old_builds[:limit]:
             yield "<tr><td>%s</td><td>%s</td><td>%s</td></tr>\n" % (
                 revision_link(myself, old_build.revision, tree),
                 build_link(myself, old_build),
@@ -1123,6 +1122,8 @@ class BuildFarmApp(object):
 if __name__ == '__main__':
     import optparse
     parser = optparse.OptionParser("[options]")
+    parser.add_option("--debug-storm", help="Enable storm debugging",
+                      default=False, action='store_true')
     parser.add_option("--port", help="Port to listen on [localhost:8000]",
         default="localhost:8000", type=str)
     opts, args = parser.parse_args()
@@ -1150,6 +1151,9 @@ if __name__ == '__main__':
     except ValueError:
         address = "localhost"
         port = opts.port
+    if opts.debug_storm:
+        from storm.tracer import debug
+        debug(True, stream=sys.stdout)
     httpd = make_server(address, int(port), standaloneApp)
     print "Serving on %s:%d..." % (address, int(port))
     httpd.serve_forever()


-- 
build.samba.org


More information about the samba-cvs mailing list