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

leif at geodynamics.org leif at geodynamics.org
Thu Jun 28 13:41:30 PDT 2007


Author: leif
Date: 2007-06-28 13:41:30 -0700 (Thu, 28 Jun 2007)
New Revision: 7552

Modified:
   cs/buildbot/trunk/buildbot/config.py
   cs/buildbot/trunk/buildbot/lines.py
Log:
Made the nightly schedule a bit more elaborate.


Modified: cs/buildbot/trunk/buildbot/config.py
===================================================================
--- cs/buildbot/trunk/buildbot/config.py	2007-06-28 19:35:29 UTC (rev 7551)
+++ cs/buildbot/trunk/buildbot/config.py	2007-06-28 20:41:30 UTC (rev 7552)
@@ -238,8 +238,9 @@
         ### for line in lines
 
         hour = 0
+        minute = 0
         for line in self.lines:
-            hour = line.postGenerate(hour)
+            hour, minute = line.postGenerate(hour, minute)
 
         self.collectSchedulers()
 

Modified: cs/buildbot/trunk/buildbot/lines.py
===================================================================
--- cs/buildbot/trunk/buildbot/lines.py	2007-06-28 19:35:29 UTC (rev 7551)
+++ cs/buildbot/trunk/buildbot/lines.py	2007-06-28 20:41:30 UTC (rev 7552)
@@ -65,7 +65,7 @@
         return
 
 
-    def postGenerate(self, hour):
+    def postGenerate(self, hour, minute):
         
         # If I depend upon another project, trigger a build of me
         # every time a build of the other project completes
@@ -81,10 +81,15 @@
         # If other projects depend upon me, make sure I am installed
         # on all slaves eventually (within a 24-hour period).
         if self.isDependency:
-            self.schedulers.append(self.newNightlyScheduler(hour))
+            self.schedulers.append(self.newNightlyScheduler(hour, minute))
             hour = hour + 1
+            if hour > 6:
+                hour = 0
+                minute = minute + 15
+                if minute >= 60:
+                    minute = 0
         
-        return hour
+        return hour, minute
 
 
     def newBuilder(self, buildEnv, buildConfig):
@@ -220,8 +225,8 @@
         return s
 
 
-    def newNightlyScheduler(self, hour):
-        return Nightly("nightly " + self.fullName(), self.builderNames, hour=hour, minute=0)
+    def newNightlyScheduler(self, hour, minute):
+        return Nightly("nightly " + self.fullName(), self.builderNames, hour=hour, minute=minute)
 
 
 class Trunk(Line):



More information about the cig-commits mailing list