[cig-commits] r7657 - in cs/buildbot/trunk/buildbot: . status

leif at geodynamics.org leif at geodynamics.org
Thu Jul 12 20:17:53 PDT 2007


Author: leif
Date: 2007-07-12 20:17:53 -0700 (Thu, 12 Jul 2007)
New Revision: 7657

Modified:
   cs/buildbot/trunk/buildbot/bs.py
   cs/buildbot/trunk/buildbot/projects.py
   cs/buildbot/trunk/buildbot/status/html.py
Log:
As I remarked earlier, PETSC_MAKE_STOP_ON_ERROR does not work.
Therefore, I created a special subclass of ShellCommand which will
scan the PETSc build log for "petsc-maint at mcs.anl.gov"; if found, the
build status is set to FAILURE (red).

Fixed 'buildbotURL' used by html.Waterfall and mail.MailNotifier.

Disabled the user authentication introduced in r5926 because 1) we
don't use it; 2) the resulting redirects sometimes result in empty
waterfalls; 3) it adds an annoying "__session_just_started__=1" to the
URL.


Modified: cs/buildbot/trunk/buildbot/bs.py
===================================================================
--- cs/buildbot/trunk/buildbot/bs.py	2007-07-13 02:04:04 UTC (rev 7656)
+++ cs/buildbot/trunk/buildbot/bs.py	2007-07-13 03:17:53 UTC (rev 7657)
@@ -170,6 +170,40 @@
 distutils = Distutils()
 
 
+class ASECompile(step.ShellCommand):
+
+    # A PETSc build is subject to one of the greatest evils: silent
+    # failure.  If a compilation fails, the error is ignored.
+    # Ostensibly, setting the make variable PETSC_MAKE_STOP_ON_ERROR
+    # to an empty string fixes this broken behavior.  Problem is, it
+    # doesn't work.
+
+    # Hence, this class.
+
+    haltOnFailure = 1
+
+    def createSummary(self, log):
+        """Scan the log for the petsc-maint e-mail address.  If found,
+        assume the build failed."""
+        
+        from StringIO import StringIO
+        
+        self.error = 0
+
+        email = "petsc-maint at mcs.anl.gov"
+        for line in StringIO(log.getText()):
+            if line.find(email) != -1:
+                self.error = 1
+
+        return
+
+    def evaluateCommand(self, cmd):
+        from buildbot.status.builder import SUCCESS, FAILURE
+        if cmd.rc != 0 or self.error:
+            return FAILURE
+        return SUCCESS
+
+
 class ASEBuildSystem(BuildSystem):
     """ANL SIDL Environment (ASE) BuildSystem (used by PETSc)"""
 
@@ -225,10 +259,10 @@
               logfiles={"configure.log": "configure.log"},
               timeout=3600, # Building Sieve takes a long time...
               ),
-            s(step.Compile,
+            s(ASECompile,
               description=["compiling"] + desc,
               descriptionDone=desc + ["compile"],
-              command=["make", "PETSC_MAKE_STOP_ON_ERROR="],
+              command=["make"],
               workdir=workdir,
               env=env,
               timeout=3600, # Building Sieve takes a long time...

Modified: cs/buildbot/trunk/buildbot/projects.py
===================================================================
--- cs/buildbot/trunk/buildbot/projects.py	2007-07-13 02:04:04 UTC (rev 7656)
+++ cs/buildbot/trunk/buildbot/projects.py	2007-07-13 03:17:53 UTC (rev 7657)
@@ -29,7 +29,7 @@
         if self.defaultBuildSystem is None:
             self.defaultBuildSystem = gnu
 
-        self.buildbotURL = self.name.replace(' ', '_')
+        self.buildbotURL = None
 
         return
 

Modified: cs/buildbot/trunk/buildbot/status/html.py
===================================================================
--- cs/buildbot/trunk/buildbot/status/html.py	2007-07-13 02:04:04 UTC (rev 7656)
+++ cs/buildbot/trunk/buildbot/status/html.py	2007-07-13 03:17:53 UTC (rev 7657)
@@ -1874,12 +1874,19 @@
         sr.favicon = self.favicon
         sr.robots_txt = self.robots_txt
 
-        gr = simpleguard.guardResource(
-                   sr,
-                   [checkers.InMemoryUsernamePasswordDatabaseDontUse(bob="12345")],
-                   errback=LoginPage)
-        
-        self.site = server.Site(gr)
+        if False:
+            # This enables user authentication.  It is disabled for
+            # now, because 1) we don't use it; 2) the resulting
+            # redirects sometimes result in empty waterfalls; 3) it
+            # adds an annoying "__session_just_started__=1" to the
+            # URL.
+            gr = simpleguard.guardResource(
+                sr,
+                [checkers.InMemoryUsernamePasswordDatabaseDontUse(bob="12345")],
+                errback=LoginPage)
+            self.site = server.Site(gr)
+        else:
+            self.site = server.Site(sr)
 
         if self.http_port is not None:
             s = strports.service(self.http_port, self.site)



More information about the cig-commits mailing list