[cig-commits] r7561 - cs/buildbot/trunk/buildbot
leif at geodynamics.org
leif at geodynamics.org
Fri Jun 29 15:21:39 PDT 2007
Author: leif
Date: 2007-06-29 15:21:38 -0700 (Fri, 29 Jun 2007)
New Revision: 7561
Modified:
cs/buildbot/trunk/buildbot/config.py
cs/buildbot/trunk/buildbot/lines.py
Log:
Expand server-side environment variable references within the
environment itself.
Modified: cs/buildbot/trunk/buildbot/config.py
===================================================================
--- cs/buildbot/trunk/buildbot/config.py 2007-06-29 03:43:24 UTC (rev 7560)
+++ cs/buildbot/trunk/buildbot/config.py 2007-06-29 22:21:38 UTC (rev 7561)
@@ -26,7 +26,19 @@
return
+ def interpolate(self):
+ # Expand server-side environment variables. This only handles
+ # one level of expansion.
+ subst = self.copy()
+ for var in self.keys():
+ value = self[var]
+ if isinstance(value, basestring):
+ self[var] = value % subst
+ else:
+ self[var] = [i % subst for i in value]
+ return
+
class BuildConfig(object):
def __init__(self, name, env, tag=None, slaves=None, configureArgs=None, basedir=None,
@@ -37,12 +49,18 @@
# I designed BuildConfig & BuildSlave when I thought BuildBot
# did load balancing. But, in fact, BuildBot does load
- # balancing only when the user repeatedly clicks the "Force
- # Build" button for a single Builder (i.e., in a single column
- # of the waterfall display). Therefore, for now, each
- # BuildConfig is assigned to a unique slave. If 'slave' is
- # 'None', it uses 'defaultSlave' from the parent
- # BuildEnvironment.
+ # balancing only within each column of the waterfall display.
+ # E.g., if the user repeatedly clicks the "Force Build" button
+ # for a single Builder with multiple slaves, it will
+ # distribute the builds among those slaves. But if the same
+ # set of slaves is assigned to multiple builders (columns), no
+ # useful load balancing takes place across column boundaries.
+ # Instead, a single slave does the builds for all columns,
+ # while the other slaves remain idle.
+
+ # Therefore, for now, each BuildConfig is assigned to a unique
+ # slave. If 'slave' is 'None', it uses 'defaultSlave' from
+ # the parent BuildEnvironment.
self.slaves = slaves
self.configureArgs = configureArgs or {}
Modified: cs/buildbot/trunk/buildbot/lines.py
===================================================================
--- cs/buildbot/trunk/buildbot/lines.py 2007-06-29 03:43:24 UTC (rev 7560)
+++ cs/buildbot/trunk/buildbot/lines.py 2007-06-29 22:21:38 UTC (rev 7561)
@@ -128,6 +128,7 @@
env = buildEnv.getEnv(buildConfig)
env.update(self.dependencyEnv())
env.update(self.env)
+ env.interpolate()
steps = []
More information about the cig-commits
mailing list