Bug 1257570 - --spsProfile doesn't work from try syntax. r?wlach
MozReview-Commit-ID: 50N5inHlBsd
--- 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):