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

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

Issue 2175063002: Revert of Change PGO recipe to use MB now that it supports multiple phases. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: merge Created 4 years, 5 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
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/pgo/api.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 re 5 import re
6 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 from recipe_engine import util as recipe_util 8 from recipe_engine import util as recipe_util
9 9
10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder):
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 env.update(self.c.gyp_env.as_jsonish()) 508 env.update(self.c.gyp_env.as_jsonish())
509 509
510 if self.c.project_generator.tool != 'gyp': 510 if self.c.project_generator.tool != 'gyp':
511 env['GYP_CHROMIUM_NO_ACTION'] = 1 511 env['GYP_CHROMIUM_NO_ACTION'] = 1
512 kwargs['env'] = env 512 kwargs['env'] = env
513 if self.c.TARGET_CROS_BOARD: 513 if self.c.TARGET_CROS_BOARD:
514 # Wrap 'runhooks' through 'cros chrome-sdk' 514 # Wrap 'runhooks' through 'cros chrome-sdk'
515 kwargs['wrapper'] = self.get_cros_chrome_sdk_wrapper(clean=True) 515 kwargs['wrapper'] = self.get_cros_chrome_sdk_wrapper(clean=True)
516 self.m.gclient.runhooks(**kwargs) 516 self.m.gclient.runhooks(**kwargs)
517 517
518 # No cover because internal recipes use this. 518 def run_gyp_chromium(self):
519 def run_gyp_chromium(self): # pragma: no cover
520 gyp_chromium_path = self.m.path['checkout'].join('build', 'gyp_chromium.py') 519 gyp_chromium_path = self.m.path['checkout'].join('build', 'gyp_chromium.py')
521 env = self.get_env() 520 env = self.get_env()
522 env.update(self.c.gyp_env.as_jsonish()) 521 env.update(self.c.gyp_env.as_jsonish())
523 self.m.python(name='gyp_chromium', script=gyp_chromium_path, env=env); 522 self.m.python(name='gyp_chromium', script=gyp_chromium_path, env=env);
524 523
525 def run_gn(self, use_goma=False, gn_path=None, build_dir=None, **kwargs): 524 def run_gn(self, use_goma=False, gn_path=None, build_dir=None, **kwargs):
526 if not gn_path: 525 if not gn_path:
527 gn_path = self.m.path['depot_tools'].join('gn.py') 526 gn_path = self.m.path['depot_tools'].join('gn.py')
528 527
529 gn_args = list(self.c.gn_args) 528 gn_args = list(self.c.gn_args)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 '--args=%s' % ' '.join(gn_args), 570 '--args=%s' % ' '.join(gn_args),
572 ] 571 ]
573 if str(gn_path).endswith('.py'): 572 if str(gn_path).endswith('.py'):
574 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs) 573 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs)
575 else: 574 else:
576 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs) 575 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs)
577 576
578 def run_mb(self, mastername, buildername, use_goma=True, 577 def run_mb(self, mastername, buildername, use_goma=True,
579 mb_config_path=None, isolated_targets=None, name=None, 578 mb_config_path=None, isolated_targets=None, name=None,
580 build_dir=None, android_version_code=None, 579 build_dir=None, android_version_code=None,
581 android_version_name=None, gyp_script=None, phase=None, 580 android_version_name=None, gyp_script=None, **kwargs):
582 **kwargs):
583 mb_config_path = (mb_config_path or 581 mb_config_path = (mb_config_path or
584 self.m.path['checkout'].join('tools', 'mb', 582 self.m.path['checkout'].join('tools', 'mb',
585 'mb_config.pyl')) 583 'mb_config.pyl'))
586 isolated_targets = isolated_targets or [] 584 isolated_targets = isolated_targets or []
587 585
588 out_dir = 'out' 586 out_dir = 'out'
589 if self.c.TARGET_CROS_BOARD: 587 if self.c.TARGET_CROS_BOARD:
590 out_dir += '_%s' % self.c.TARGET_CROS_BOARD 588 out_dir += '_%s' % self.c.TARGET_CROS_BOARD
591 589
592 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs) 590 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs)
593 591
594 args=[ 592 args=[
595 'gen', 593 'gen',
596 '-m', mastername, 594 '-m', mastername,
597 '-b', buildername, 595 '-b', buildername,
598 '--config-file', mb_config_path, 596 '--config-file', mb_config_path,
599 ] 597 ]
600 598
601 if phase is not None:
602 args += [ '--phase', str(phase) ]
603
604 if use_goma: 599 if use_goma:
605 goma_dir = self.c.compile_py.goma_dir 600 goma_dir = self.c.compile_py.goma_dir
606 if not goma_dir: 601 if not goma_dir:
607 # This method defaults to use_goma=True, which doesn't necessarily 602 # This method defaults to use_goma=True, which doesn't necessarily
608 # match build-side configuration. However, MB is configured 603 # match build-side configuration. However, MB is configured
609 # src-side, and so it might be actually using goma. 604 # src-side, and so it might be actually using goma.
610 self.ensure_goma() 605 self.ensure_goma()
611 goma_dir = self.c.compile_py.goma_dir 606 goma_dir = self.c.compile_py.goma_dir
612 if not goma_dir: # pragma: no cover 607 if not goma_dir: # pragma: no cover
613 # TODO(phajdan.jr): remove fallback when we always use cipd for goma. 608 # TODO(phajdan.jr): remove fallback when we always use cipd for goma.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 })) 784 }))
790 785
791 def get_annotate_by_test_name(self, test_name): 786 def get_annotate_by_test_name(self, test_name):
792 return 'graphing' 787 return 'graphing'
793 788
794 def download_lto_plugin(self): 789 def download_lto_plugin(self):
795 return self.m.python( 790 return self.m.python(
796 name='download LTO plugin', 791 name='download LTO plugin',
797 script=self.m.path['checkout'].join( 792 script=self.m.path['checkout'].join(
798 'build', 'download_gold_plugin.py')) 793 'build', 'download_gold_plugin.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/pgo/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698