summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 00:49:57 +0000
committermmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-08 00:49:57 +0000
commit7a960ade609bfd7e4f07f8e8582455a9670bb399 (patch)
tree2aac17d391e920746b8c08a3a16f616660b63f0b
parent095dc66a17452adee8f2458d4d539f5a4dd17f01 (diff)
downloadchromium_src-7a960ade609bfd7e4f07f8e8582455a9670bb399.zip
chromium_src-7a960ade609bfd7e4f07f8e8582455a9670bb399.tar.gz
chromium_src-7a960ade609bfd7e4f07f8e8582455a9670bb399.tar.bz2
Fix for "gomacc not found" on perf bisect steps.
BUG=386662 Review URL: https://codereview.chromium.org/363203004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281615 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/bisect-perf-regression.py13
-rwxr-xr-xtools/run-bisect-perf-regression.py3
2 files changed, 13 insertions, 3 deletions
diff --git a/tools/bisect-perf-regression.py b/tools/bisect-perf-regression.py
index 24b0518..bd281be 100755
--- a/tools/bisect-perf-regression.py
+++ b/tools/bisect-perf-regression.py
@@ -642,7 +642,7 @@ def CheckRunGit(command, cwd=None):
return output
-def SetBuildSystemDefault(build_system, use_goma):
+def SetBuildSystemDefault(build_system, use_goma, goma_dir):
"""Sets up any environment variables needed to build with the specified build
system.
@@ -671,6 +671,8 @@ def SetBuildSystemDefault(build_system, use_goma):
if use_goma:
os.environ['GYP_DEFINES'] = '%s %s' % (os.getenv('GYP_DEFINES', ''),
'use_goma=1')
+ if goma_dir:
+ os.environ['GYP_DEFINES'] += ' gomadir=%s' % goma_dir
def BuildWithMake(threads, targets, build_type='Release'):
@@ -759,7 +761,8 @@ class Builder(object):
raise RuntimeError(
'Path to visual studio could not be determined.')
else:
- SetBuildSystemDefault(opts.build_preference, opts.use_goma)
+ SetBuildSystemDefault(opts.build_preference, opts.use_goma,
+ opts.goma_dir)
else:
if not opts.build_preference:
if 'ninja' in os.getenv('GYP_GENERATORS'):
@@ -767,7 +770,7 @@ class Builder(object):
else:
opts.build_preference = 'make'
- SetBuildSystemDefault(opts.build_preference, opts.use_goma)
+ SetBuildSystemDefault(opts.build_preference, opts.use_goma, opts.goma_dir)
if not bisect_utils.SetupPlatformBuildEnvironment(opts):
raise RuntimeError('Failed to set platform environment.')
@@ -3708,6 +3711,7 @@ class BisectOptions(object):
self.good_revision = None
self.bad_revision = None
self.use_goma = None
+ self.goma_dir = None
self.cros_board = None
self.cros_remote_ip = None
self.repeat_test_count = 20
@@ -3833,6 +3837,9 @@ class BisectOptions(object):
action="store_true",
help='Add a bunch of extra threads for goma, and enable '
'goma')
+ group.add_option('--goma_dir',
+ help='Path to goma tools (or system default if not '
+ 'specified).')
group.add_option('--output_buildbot_annotations',
action="store_true",
help='Add extra annotation output for buildbot.')
diff --git a/tools/run-bisect-perf-regression.py b/tools/run-bisect-perf-regression.py
index 3a7ddb0..c2f42ad 100755
--- a/tools/run-bisect-perf-regression.py
+++ b/tools/run-bisect-perf-regression.py
@@ -196,6 +196,8 @@ def _CreateBisectOptionsFromConfig(config):
if config.has_key('use_goma'):
opts_dict['use_goma'] = config['use_goma']
+ if config.has_key('goma_dir'):
+ opts_dict['goma_dir'] = config['goma_dir']
opts_dict['build_preference'] = 'ninja'
opts_dict['output_buildbot_annotations'] = True
@@ -318,6 +320,7 @@ def _SetupAndRunPerformanceTest(config, path_to_file, path_to_goma):
try:
with Goma(path_to_goma) as goma:
config['use_goma'] = bool(path_to_goma)
+ config['goma_dir'] = os.path.abspath(path_to_goma)
_RunPerformanceTest(config, path_to_file)
return 0
except RuntimeError, e: