[llvm-commits] [zorg] r125905 - in /zorg/trunk/llvmlab/llvmlab: ci/status.py llvmlabtool/main.py ui/app.py
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:42:56 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:42:56 2011
New Revision: 125905
URL: http://llvm.org/viewvc/llvm-project?rev=125905&view=rev
Log:
llvmlab: Add a master URL parameter to the status object.
Modified:
zorg/trunk/llvmlab/llvmlab/ci/status.py
zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py
zorg/trunk/llvmlab/llvmlab/ui/app.py
Modified: zorg/trunk/llvmlab/llvmlab/ci/status.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ci/status.py?rev=125905&r1=125904&r2=125905&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ci/status.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ci/status.py Fri Feb 18 10:42:56 2011
@@ -3,6 +3,7 @@
"""
from llvmlab import util
+import buildbot.statusclient
class BuildStatus(util.simple_repr_mixin):
@staticmethod
@@ -39,15 +40,26 @@
if version != 0:
raise ValueError, "Unknown version"
- return Status(dict((name, [BuildStatus.fromdata(b)
+ sc = data.get('statusclient')
+ if sc:
+ sc = buildbot.statusclient.StatusClient.fromdata(sc)
+ return Status(data['master_url'],
+ dict((name, [BuildStatus.fromdata(b)
for b in builds])
- for name,builds in data['builders']))
+ for name,builds in data['builders']),
+ sc)
def todata(self):
return { 'version' : 0,
+ 'master_url' : self.master_url,
'builders' : [(name, [b.todata()
for b in builds])
- for name,builds in self.builders.items()] }
+ for name,builds in self.builders.items()],
+ 'statusclient' : self.statusclient.todata() }
- def __init__(self, builders):
+ def __init__(self, master_url, builders, statusclient = None):
+ self.master_url = master_url
self.builders = builders
+ if statusclient is None and master_url:
+ statusclient = buildbot.statusclient.StatusClient(master_url)
+ self.statusclient = statusclient
Modified: zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py?rev=125905&r1=125904&r2=125905&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py (original)
+++ zorg/trunk/llvmlab/llvmlab/llvmlabtool/main.py Fri Feb 18 10:42:56 2011
@@ -50,6 +50,9 @@
group.add_option("", "--admin-email", dest="admin_email",
help="administrator email [%default]",
default='admin at example.com')
+ group.add_option("", "--master-url", dest="master_url",
+ help="URL for the buildbot master [%default]",
+ default='http://lab.llvm.org:8013')
group.add_option("", "--debug-server", dest="debug_server",
help="run server in debug mode [%default]",
@@ -107,7 +110,7 @@
# Construct the initial database and status files.
data = llvmlab.data.Data(users = [], machines = [])
- status = llvmlab.ci.status.Status({})
+ status = llvmlab.ci.status.Status(opts.master_url, {})
# Construct an app instance, and save the data.
instance = llvmlab.ui.app.App.create_standalone(data = data,
Modified: zorg/trunk/llvmlab/llvmlab/ui/app.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/app.py?rev=125905&r1=125904&r2=125905&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/app.py (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/app.py Fri Feb 18 10:42:56 2011
@@ -56,7 +56,7 @@
data = llvmlab.data.Data(users = [], machines = [])
# Construct an empty status file.
- data = llvmlab.ci.status.Status({})
+ data = llvmlab.ci.status.Status(None, {})
return App.create_standalone(config, data, status)
More information about the llvm-commits
mailing list