Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: scripts/slave/recipe_modules/v8/api.py

Issue 2081643004: V8: switch more linux bots to mb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Review Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/v8/builders.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import argparse 5 import argparse
6 import datetime 6 import datetime
7 import difflib 7 import difflib
8 import random 8 import random
9 import re 9 import re
10 import urllib 10 import urllib
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 self.upload_isolated_json() 409 self.upload_isolated_json()
410 410
411 def _compare_gyp_defines(self, mb_output): 411 def _compare_gyp_defines(self, mb_output):
412 """Compare infra gyp flags with client gyp flags. 412 """Compare infra gyp flags with client gyp flags.
413 413
414 Returns the difference as a list of strings or an empty list if there is 414 Returns the difference as a list of strings or an empty list if there is
415 none. 415 none.
416 """ 416 """
417 417
418 def gyp_defines_to_dict(gyp_defines): 418 def gyp_defines_to_dict(gyp_defines):
419 return dict(tuple(x.split('=', 1)) for x in gyp_defines.split()) 419 # Example input: "foo=1 bar='buz bing'". We assume there's no '=' in the
420 # value part.
421 result = []
422 for x in gyp_defines.split():
423 kv = x.split('=', 1)
424 if len(kv) == 1:
425 # No '=' in x. It's part of a quoted string containing a space.
426 # Append it to the last value.
427 result[-1][1] += (' ' + kv[0])
428 else:
429 result.append(kv)
430 return dict(tuple(kv) for kv in result)
420 431
421 infra_flags = gyp_defines_to_dict( 432 infra_flags = gyp_defines_to_dict(
422 self.m.chromium.c.gyp_env.as_jsonish()['GYP_DEFINES']) 433 self.m.chromium.c.gyp_env.as_jsonish()['GYP_DEFINES'])
423 434
424 # Get the client's gyp flags from MB's output. 435 # Get the client's gyp flags from MB's output.
425 match = re.search('^GYP_DEFINES=\'(.*)\'$', mb_output, re.M) 436 match = re.search('^GYP_DEFINES=\'(.*)\'$', mb_output, re.M)
426 437
427 # This won't match in the gn case. 438 # This won't match in the gn case.
428 if match: 439 if match:
429 client_flags = gyp_defines_to_dict(match.group(1)) 440 client_flags = gyp_defines_to_dict(match.group(1))
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 def report_culprits(self, culprit_range): 1255 def report_culprits(self, culprit_range):
1245 assert culprit_range 1256 assert culprit_range
1246 if len(culprit_range) > 1: 1257 if len(culprit_range) > 1:
1247 text = 'Suspecting multiple commits' 1258 text = 'Suspecting multiple commits'
1248 else: 1259 else:
1249 text = 'Suspecting %s' % culprit_range[0][:8] 1260 text = 'Suspecting %s' % culprit_range[0][:8]
1250 1261
1251 step_result = self.m.step(text, cmd=None) 1262 step_result = self.m.step(text, cmd=None)
1252 for culprit in culprit_range: 1263 for culprit in culprit_range:
1253 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit 1264 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/v8/builders.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698