[cig-commits] r7064 - cs/buildbot/trunk/buildbot

leif at geodynamics.org leif at geodynamics.org
Mon Jun 4 17:26:06 PDT 2007


Author: leif
Date: 2007-06-04 17:26:06 -0700 (Mon, 04 Jun 2007)
New Revision: 7064

Modified:
   cs/buildbot/trunk/buildbot/config.py
Log:
Allow individual configs to override the 'basedir' (so I can use
/scratch/buildbot on CITerra -- which is much faster and more reliable
than $HOME on Ibrix).


Modified: cs/buildbot/trunk/buildbot/config.py
===================================================================
--- cs/buildbot/trunk/buildbot/config.py	2007-06-04 23:50:43 UTC (rev 7063)
+++ cs/buildbot/trunk/buildbot/config.py	2007-06-05 00:26:06 UTC (rev 7064)
@@ -1,7 +1,7 @@
 
 
 class BuildConfig(object):
-    def __init__(self, name, env, slaves=None, configureArgs=None):
+    def __init__(self, name, env, slaves=None, configureArgs=None, basedir=None):
         self.name = name
         self.env = env
 
@@ -16,6 +16,7 @@
         self.slaves = slaves
         
         self.configureArgs = configureArgs or {}
+        self.basedir = basedir or "%(HOME)s"
 
         return
 
@@ -41,8 +42,7 @@
         return
 
     def getEnv(self, config):
-        basedir = "%(HOME)s"
-        prefix = basedir + "/install/" + self.configFilename(config)
+        prefix = config.basedir + "/install/" + self.configFilename(config)
         env = {
             "HOME": "%(HOME)s", # expanded by the slave
             "WORKDIR": "%(WORKDIR)s", # expanded by the slave



More information about the cig-commits mailing list