Bug 743872 - update TPS to use latest pulsebuildmonitor, a=testonly, DONTBUILD, npotb
authorJonathan Griffin <jgriffin@mozilla.com>
Mon, 09 Apr 2012 17:09:20 -0700
changeset 91385 98efc3eca3d70c3888e7b6bd1bbb304d0c5d1882
parent 91384 eecb4cf4c45d03d936ffff169922b7526f8f2ae5
child 91386 cf6ac3f55a41ae0784d353e577e22d36816bde6e
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerstestonly, DONTBUILD, npotb
bugs743872
milestone14.0a1
Bug 743872 - update TPS to use latest pulsebuildmonitor, a=testonly, DONTBUILD, npotb
testing/tps/setup.py
testing/tps/tps/pulse.py
--- a/testing/tps/setup.py
+++ b/testing/tps/setup.py
@@ -35,17 +35,17 @@
 #
 # ***** END LICENSE BLOCK *****
 
 import sys
 from setuptools import setup, find_packages
 
 version = '0.2.40'
 
-deps = ['pulsebuildmonitor >= 0.2', 'MozillaPulse == .4', 
+deps = ['pulsebuildmonitor >= 0.62', 'MozillaPulse == 0.61', 
         'mozinfo == 0.3.1', 'mozprofile == 0.1t',
         'mozprocess == 0.1a', 'mozrunner == 3.0a', 'mozregression == 0.3',
         'mozautolog >= 0.2.1']
 
 # we only support python 2.6+ right now
 assert sys.version_info[0] == 2
 assert sys.version_info[1] >= 6
 
--- a/testing/tps/tps/pulse.py
+++ b/testing/tps/tps/pulse.py
@@ -46,55 +46,52 @@ from tps.thread import TPSTestThread
 class TPSPulseMonitor(PulseBuildMonitor):
   """Listens to pulse messages, and initiates a TPS test run when
      a relevant 'build complete' message is received.
   """
 
   def __init__(self, extensionDir, platform='linux', config=None,
                autolog=False, emailresults=False, testfile=None,
                logfile=None, rlock=None, **kwargs):
-    self.buildtype = 'opt'
+    self.buildtype = ['opt']
     self.autolog = autolog
     self.emailresults = emailresults
     self.testfile = testfile
     self.logfile = logfile
     self.rlock = rlock
     self.extensionDir = extensionDir
     self.config = config
-    self.tree = self.config.get('tree', ['services-central', 'places'])
-    self.platform = self.config.get('platform', 'linux')
+    self.tree = self.config.get('tree', ['services-central'])
+    self.platform = [self.config.get('platform', 'linux')]
     self.label=('crossweave@mozilla.com|tps_build_monitor_' +
                 socket.gethostname())
 
     self.logger = logging.getLogger('tps_pulse')
     self.logger.setLevel(logging.DEBUG)
     handler = logging.FileHandler('tps_pulse.log')
     self.logger.addHandler(handler)
 
     PulseBuildMonitor.__init__(self,
-                               tree=self.tree,
+                               trees=self.tree,
                                label=self.label,
-                               mobile=False,
                                logger=self.logger,
+                               platforms=self.platform,
+                               buildtypes=self.buildtype,
+                               builds=True,
                                **kwargs)
 
   def onPulseMessage(self, data):
     key = data['_meta']['routing_key']
     #print key
 
   def onBuildComplete(self, builddata):
     print "================================================================="
     print json.dumps(builddata)
     print "================================================================="
-    try:
-      if not (builddata['platform'] == self.platform and
-              builddata['buildtype'] == self.buildtype):
-        return
-    except KeyError:
-      return
+
     thread = TPSTestThread(self.extensionDir,
                            builddata=builddata,
                            emailresults=self.emailresults,
                            autolog=self.autolog,
                            testfile=self.testfile,
                            logfile=self.logfile,
                            rlock=self.rlock,
                            config=self.config)