Bug 1257570 - --spsProfile doesn't work from try syntax. r=wlach
authorJoel Maher <jmaher@mozilla.com>
Fri, 06 May 2016 09:38:34 -0400
changeset 296420 47bc46e92a73
parent 296419 dba9974342da
child 296421 c6251c984ad6
child 296496 70dfd4254cf9
push id76323
push userjmaher@mozilla.com
push date2016-05-06 17:19 +0000
treeherdermozilla-inbound@47bc46e92a73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswlach
bugs1257570
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1257570 - --spsProfile doesn't work from try syntax. r=wlach MozReview-Commit-ID: 50N5inHlBsd
testing/mozharness/mozharness/mozilla/testing/talos.py
--- a/testing/mozharness/mozharness/mozilla/testing/talos.py
+++ b/testing/mozharness/mozharness/mozilla/testing/talos.py
@@ -172,24 +172,27 @@ class Talos(TestingMixin, MercurialScrip
             # now let's see if we added spsProfile specs in the commit message
             try:
                 junk, junk, opts = self.buildbot_config['sourcestamp']['changes'][-1]['comments'].partition('mozharness:')
             except IndexError:
                 # when we don't have comments on changes (bug 1255187)
                 opts = None
 
             if opts:
+              # In the case of a multi-line commit message, only examine
+              # the first line for mozharness options
+              opts = opts.split('\n')[0]
               opts = re.sub(r'\w+:.*', '', opts).strip().split(' ')
               if "--spsProfile" in opts:
                   # overwrite whatever was set here.
                   self.sps_profile = True
               try:
-                    idx = opts.index('--spsProfileInterval')
-                    if len(opts) > idx + 1:
-                        self.sps_profile_interval = opts[idx + 1]
+                  idx = opts.index('--spsProfileInterval')
+                  if len(opts) > idx + 1:
+                      self.sps_profile_interval = opts[idx + 1]
               except ValueError:
                   pass
         # finally, if sps_profile is set, we add that to the talos options
         if self.sps_profile:
             sps_results.append('--spsProfile')
             if self.sps_profile_interval:
                 sps_results.extend(
                     ['--spsProfileInterval', str(self.sps_profile_interval)]
@@ -237,18 +240,16 @@ class Talos(TestingMixin, MercurialScrip
         if binary_path.endswith('.exe'):
             binary_path = binary_path[:-4]
         # options overwritten from **kw
         kw_options = {'executablePath': binary_path}
         if 'suite' in self.config:
             kw_options['suite'] = self.config['suite']
         if self.config.get('title'):
             kw_options['title'] = self.config['title']
-            if kw_options['title'].startswith('tst-linux64-spot'):
-                kw_options['framework'] = 'talos-aws'
         if self.config.get('branch'):
             kw_options['branchName'] = self.config['branch']
         if self.symbols_path:
             kw_options['symbolsPath'] = self.symbols_path
         kw_options.update(kw)
         # talos expects tests to be in the format (e.g.) 'ts:tp5:tsvg'
         tests = kw_options.get('activeTests')
         if tests and not isinstance(tests, basestring):