Electrloysis buildbots
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 09 Jul 2009 16:01:53 -0400
changeset 17 47ddc2da18a6
parent 16 f1daae53f5ce
child 18 725708beeed3
push id10
push userbsmedberg@mozilla.com
push dateThu, 09 Jul 2009 20:02:00 +0000
Electrloysis buildbots
.hgignore
master.cfg
mozconfig-electrolysis-linux
mozconfig-electrolysis-win
warning-ui/index.html
warning-ui/new.html
warning-ui/ui.py
--- a/.hgignore
+++ b/.hgignore
@@ -1,6 +1,9 @@
 ^full/
+^full-tm/
+^full-electrolysis/
+^full-electrolysis-win/
 ~$
 ^buildbot.tac$
 \.pyc$
 ^twistd.log
 ^twistd.pid$
--- a/master.cfg
+++ b/master.cfg
@@ -6,18 +6,19 @@
 c = BuildmasterConfig = {}
 
 ####### BUILDSLAVES
 
 # the 'slaves' list defines the set of allowable buildslaves. Each element is
 # a tuple of bot-name and bot-password. These correspond to values given to
 # the buildslave's mktap invocation.
 
-from slaves import slaveList
-c['slaves'] = slaveList
+import slaves
+reload(slaves)
+c['slaves'] = slaves.slaveList
 
 # 'slavePortnum' defines the TCP port to listen on. This must match the value
 # configured into the buildslaves (with their --master option)
 
 c['slavePortnum'] = 9900
 
 ####### CHANGESOURCES
 
@@ -30,17 +31,20 @@ from buildbotcustom.changes.hgpoller imp
 
 c['change_source'] = [
     PBChangeSource(),
     HgPoller(hgURL='http://hg.mozilla.org/',
              branch='mozilla-central',
              pollInterval=120),
     HgPoller(hgURL='http://hg.mozilla.org/',
              branch='tracemonkey',
-             pollInterval=60),
+             pollInterval=120),
+    HgPoller(hgURL='http://hg.mozilla.org/',
+             branch='projects/electrolysis',
+             pollInterval=120),
     ]
 
 ####### SCHEDULERS
 
 ## configure the Schedulers
 
 from buildbot.scheduler import Periodic, Scheduler
 
@@ -54,16 +58,21 @@ c['schedulers'].append(Scheduler(name='t
 
 c['schedulers'].append(Scheduler(name="onchange", branch='mozilla-central',
                                  treeStableTimer=120,
                                  builderNames=['static-analysis-bsmedberg']))
 # c['schedulers'].append(Periodic(name='centralperiodic', branch='mozilla-central',
 #                                 periodicBuildTimer=60 * 60 * 4,
 #                                 builderNames=['static-analysis-bsmedberg']))
 
+c['schedulers'].append(Scheduler(name="elchange",
+                                 branch="projects/electrolysis",
+                                 treeStableTimer=60,
+                                 builderNames=['linux-electrolysis', 'win-electrolysis']))
+
 ####### BUILDERS
 
 # the 'builders' list defines the Builders. Each one is configured with a
 # dictionary, using the following keys:
 #  name (required): the name used to describe this bilder
 #  slavename (required): which slave to use, must appear in c['bots']
 #  builddir (required): which subdirectory to run the builder in
 #  factory (required): a BuildFactory to define how the build is run
@@ -90,17 +99,17 @@ f1 = factory.BuildFactory()
 f1.addStep(Mercurial(baseURL='http://hg.mozilla.org/', mode="copy"))
 
 changesetLink = '<a href=http://hg.mozilla.org/mozilla-central/rev/%(got_revision)s title="Built from revision %(got_revision)s">rev:%(got_revision)s</a>'
 f1.addStep(ShellCommand(command=['printf', 'TinderboxPrint:%s\n',
                                  WithProperties(changesetLink)]))
 
 f1.addStep(FileDownload(mastersrc="mozconfig", slavedest=".mozconfig"))
 
-f1.addStep(Compile(command='make -f client.mk -w >build.log 2>&1', env={'LANG': 'C'}, logfiles={'build': 'build.log'}))
+f1.addStep(Compile(command='make -f client.mk -w >build.log 2>&1', env={'LANG': 'C'}, logfiles={'build': 'build.log'}, timeout=1800))
 f1.addStep(FileDownload(mastersrc="warning-parser.py", slavedest="warning-parser.py"))
 f1.addStep(FileDownload(mastersrc="cvsblame.db", slavedest="cvsblame.db"))
 f1.addStep(WarningParserStep(command=['python', 'warning-parser.py', '.', 'cvsblame.db', 'build.log'], dbfile='warnings.db'))
 
 b1 = {'name': 'static-analysis-bsmedberg',
       'slavename': "staticanalysis-slave-linux",
       'builddir': "full",
       'factory': f1,
@@ -108,27 +117,56 @@ b1 = {'name': 'static-analysis-bsmedberg
 
 f2 = factory.BuildFactory()
 
 f2.addStep(Mercurial(baseURL='http://hg.mozilla.org/', mode="update"))
 tmchangesetLink = '<a href=http://hg.mozilla.org/tracemonkey/rev/%(got_revision)s title="Built from revision %(got_revision)s">rev:%(got_revision)s</a>'
 f2.addStep(ShellCommand(command=['printf', 'TinderboxPrint:%s\n',
                                  WithProperties(tmchangesetLink)]))
 f2.addStep(FileDownload(mastersrc="mozconfig-tracemonkey", slavedest=".mozconfig"))
-f2.addStep(Compile(command='make -f client.mk', env={'LANG': 'C'}))
+f2.addStep(Compile(command='make -f client.mk', env={'LANG': 'C'}, timeout=1800))
 
 b2 = {'name': 'static-analysis-tracemonkey',
       'slavename': 'staticanalysis-slave-linux',
       'builddir': 'full-tm',
       'factory': f2,
       }
 
+f3 = factory.BuildFactory()
+f3.addStep(Mercurial(baseURL='http://hg.mozilla.org/', mode="update"))
+eCsetLink = '<a href="http://hg.mozilla.org/projects/electrolysis/rev/%(got_revision)s" title="Built from revision %(got_revision)s">rev:%(got_revision)s</a>'
+f3.addStep(ShellCommand(command=['printf', 'TinderboxPrint:%s\n',
+                                 WithProperties(eCsetLink)]))
+f3.addStep(FileDownload(mastersrc="mozconfig-electrolysis-linux", slavedest=".mozconfig"))
+f3.addStep(Compile(command='make -f client.mk', env={'LANG': 'C'}))
+
+b3 = {'name': 'linux-electrolysis',
+      'slavename': 'staticanalysis-slave-linux',
+      'builddir': 'full-electrolysis',
+      'factory': f3,
+      }
+
+f3win = factory.BuildFactory()
+f3win.addStep(Mercurial(baseURL='http://hg.mozilla.org/', mode="update"))
+f3win.addStep(ShellCommand(command=['printf', 'TinderboxPrint:%s\n',
+                                    WithProperties(eCsetLink)]))
+f3win.addStep(FileDownload(mastersrc="mozconfig-electrolysis-win", slavedest=".mozconfig"))
+f3win.addStep(Compile(command='make -f client.mk', env={'LANG': 'C'}))
+
+b3win = {'name': 'win-electrolysis',
+         'slavename': 'staticanalysis-slave-win',
+         'builddir': 'full-electrolysis-win',
+         'factory': f3win,
+         }
+
 c['builders'] = [
     b1,
-    b2
+    b2,
+    b3,
+    b3win,
     ]
 
 ####### STATUS TARGETS
 
 # 'status' is a list of Status Targets. The results of each build will be
 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
 # including web pages, email senders, and IRC bots.
 
@@ -149,16 +187,23 @@ if True:
 
     c['status'].append(TinderboxMailNotifier(fromaddr='benjamin@smedbergs.us',
                                              tree='TraceMonkey',
                                              builders=['static-analysis-tracemonkey'],
                                              extraRecipients=['tinderbox-daemon@tinderbox.mozilla.org'],
                                              relayhost='localhost',
                                              logCompression='bzip2'))
 
+    c['status'].append(TinderboxMailNotifier(fromaddr='benjamin@smedbergs.us',
+                                             tree='Electrolysis',
+                                             builders=['linux-electrolysis', 'win-electrolysis'],
+                                             extraRecipients=['tinderbox-daemon@tinderbox.mozilla.org'],
+                                             relayhost='localhost',
+                                             logCompression='bzip2'))
+
 # the 'projectName' string will be used to describe the project that this
 # buildbot is working on. For example, it is used as the title of the
 # waterfall HTML page. The 'projectURL' string will be used to provide a link
 # from buildbot HTML pages to your project's home page.
 
 c['projectName'] = "--enable-static-checking"
 c['projectURL'] = "http://developer.mozilla.org/en/Building_with_static_checking"
 
new file mode 100644
--- /dev/null
+++ b/mozconfig-electrolysis-linux
@@ -0,0 +1,14 @@
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-buildbot
+mk_add_options MOZ_MAKE_FLAGS=-j3
+
+export CC='gcc -m32'
+export CXX='g++ -m32'
+export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig
+export AR=ar
+
+ac_add_options --enable-application=browser
+ac_add_options --enable-debug
+ac_add_options --disable-optimize
+ac_add_options --target=i686-pc-linux
+ac_add_options --x-libraries=/usr/lib
+ac_add_options --disable-crashreporter
new file mode 100644
--- /dev/null
+++ b/mozconfig-electrolysis-win
@@ -0,0 +1,5 @@
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-buildbot
+
+ac_add_options --enable-application=browser
+ac_add_options --enable-debug
+ac_add_options --disable-optimize
--- a/warning-ui/index.html
+++ b/warning-ui/index.html
@@ -60,14 +60,16 @@ def convertx(x):
         </a>
       </py:for>
     </svg>
     </div>
     
     <h2>Search Most Recent Build:</h2>
     ${searchform(builds[0][0], '', '', '')}
 
+    <h2><a href="new">New Warnings (Past 100 Builds)</a></h2>
+
     <h2>Builds:</h2>
     <ul>
       <li py:for="buildnumber, rev, unique in builds"><a href="build?id=${buildnumber}">${rev}</a> - ${unique}</li>
     </ul>
   </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/warning-ui/new.html
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:xi="http://www.w3.org/2001/XInclude"
+      xmlns:py="http://genshi.edgewall.org/">
+  <xi:include href="common.inc" />
+
+  <head>
+    <title>New Warnings</title>
+  </head>
+  <body class="build">
+    <h1>New Warnings</h1>
+    <p><em>Between build ${start} and ${end}</em></p>
+
+    <ul>
+      <li py:for="signature, file, lineno, msg in newwarnings">
+        <a href="${genlink('warning', signature=signature)}">${file}:${lineno} - ${msg}</a>
+      </li>
+    </ul>
+  </body>
+</html>
--- a/warning-ui/ui.py
+++ b/warning-ui/ui.py
@@ -19,22 +19,60 @@ class Root(object):
         try:
             cur = self.dbcursor()
             cur.execute('''SELECT builds.buildnumber, builds.rev, uwarnings.ucount
                            FROM builds LEFT OUTER JOIN
                              (SELECT buildnumber, count(*) AS ucount
                               FROM warnings
                               GROUP BY buildnumber) AS uwarnings
                            ON builds.buildnumber = uwarnings.buildnumber
-                           ORDER BY builds.buildnumber DESC''')
+                           ORDER BY builds.buildnumber DESC LIMIT 100''')
             return self.render('index.html', builds=cur.fetchall())
         finally:
             cur.close()
 
     @cherrypy.expose
+    def new(self, end=-1, span=100):
+        end = int(end)
+        span = int(span)
+
+        cur = self.dbcursor()
+        if end == -1:
+            cur.execute('''SELECT max(builds.buildnumber)
+                           FROM builds''')
+            end, = cur.fetchone()
+
+        cur.execute('''SELECT min(builds.buildnumber)
+                       FROM builds
+                       WHERE builds.buildnumber > ?''', (end - span,))
+
+        start, = cur.fetchone()
+
+        cur.execute('''SELECT warnings.signature, file, lineno, msg
+                       FROM warnings, wlines
+                       WHERE
+                         warnings.buildnumber = wlines.buildnumber AND
+                         warnings.signature = wlines.signature AND
+                         wlines.wline = 0 AND
+                         warnings.buildnumber = ? AND
+                         NOT EXISTS (SELECT *
+                                     FROM warnings as oldwarnings
+                                     WHERE
+                                       oldwarnings.signature = warnings.signature AND
+                                       oldwarnings.buildnumber = ?)
+                       ORDER BY file''',
+                    (end, start))
+        newwarnings = cur.fetchall()
+        cur.close()
+        return self.render('new.html',
+                           start=start,
+                           end=end,
+                           newwarnings=newwarnings)
+        
+    @cherrypy.expose
     def search(self, id, user="", path="", msg=""):
         id = int(id)
         user = user.strip()
         path = path.strip()
         msg = msg.strip()
         
         bindp = [id]