зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1356683 - Use new tooltool wrapper in mozharness. r=chmanchester
--HG-- extra : rebase_source : 89bba9b6bcab9b1b017537d6741a88deaa38f166
This commit is contained in:
Родитель
709c879f5b
Коммит
1074eac96a
|
@ -1122,36 +1122,41 @@ or run without that action (ie: --no-{action})"
|
|||
return fn
|
||||
|
||||
def _run_tooltool(self):
|
||||
env = self.query_build_env()
|
||||
env.update(self.query_mach_build_env())
|
||||
|
||||
self._assert_cfg_valid_for_action(
|
||||
['tooltool_script', 'tooltool_bootstrap', 'tooltool_url'],
|
||||
['tooltool_script', 'tooltool_url'],
|
||||
'build'
|
||||
)
|
||||
c = self.config
|
||||
dirs = self.query_abs_dirs()
|
||||
if not c.get('tooltool_manifest_src'):
|
||||
return self.warning(ERROR_MSGS['tooltool_manifest_undetermined'])
|
||||
fetch_script_path = os.path.join(dirs['abs_tools_dir'],
|
||||
'scripts',
|
||||
'tooltool',
|
||||
'tooltool_wrapper.sh')
|
||||
tooltool_manifest_path = os.path.join(dirs['abs_src_dir'],
|
||||
c['tooltool_manifest_src'])
|
||||
python = self.query_exe('python2.7')
|
||||
cmd = [
|
||||
'sh',
|
||||
fetch_script_path,
|
||||
python, '-u',
|
||||
os.path.join(dirs['abs_src_dir'], 'mach'),
|
||||
'artifact',
|
||||
'toolchain',
|
||||
'-v',
|
||||
'--retry', '4',
|
||||
'--tooltool-manifest',
|
||||
tooltool_manifest_path,
|
||||
'--tooltool-url',
|
||||
c['tooltool_url'],
|
||||
c['tooltool_bootstrap'],
|
||||
]
|
||||
cmd.extend(c['tooltool_script'])
|
||||
auth_file = self._get_tooltool_auth_file()
|
||||
if auth_file:
|
||||
cmd.extend(['--authentication-file', auth_file])
|
||||
cache = c['env'].get('TOOLTOOL_CACHE')
|
||||
if cache:
|
||||
cmd.extend(['-c', cache])
|
||||
cmd.extend(['--cache-dir', cache])
|
||||
self.info(str(cmd))
|
||||
self.run_command_m(cmd, cwd=dirs['abs_src_dir'], halt_on_failure=True)
|
||||
self.run_command_m(cmd, cwd=dirs['abs_src_dir'], halt_on_failure=True,
|
||||
env=env)
|
||||
|
||||
def query_revision(self, source_path=None):
|
||||
""" returns the revision of the build
|
||||
|
|
|
@ -53,9 +53,11 @@ class TooltoolMixin(object):
|
|||
# Use vendored tooltool.py if available.
|
||||
if self.topsrcdir:
|
||||
cmd = [
|
||||
sys.executable,
|
||||
os.path.join(self.topsrcdir, 'python', 'mozbuild', 'mozbuild',
|
||||
'action', 'tooltool.py')
|
||||
sys.executable, '-u',
|
||||
os.path.join(self.topsrcdir, 'mach'),
|
||||
'artifact',
|
||||
'toolchain',
|
||||
'-v',
|
||||
]
|
||||
elif self.config.get("download_tooltool"):
|
||||
cmd = [sys.executable, self._fetch_tooltool_py()]
|
||||
|
@ -75,17 +77,20 @@ class TooltoolMixin(object):
|
|||
proxxy_urls = proxxy.get_proxies_and_urls(default_urls)
|
||||
|
||||
for proxyied_url in proxxy_urls:
|
||||
cmd.extend(['--url', proxyied_url])
|
||||
cmd.extend(['--tooltool-url' if self.topsrcdir else '--url', proxyied_url])
|
||||
|
||||
# handle authentication file, if given
|
||||
auth_file = self._get_auth_file()
|
||||
if auth_file and os.path.exists(auth_file):
|
||||
cmd.extend(['--authentication-file', auth_file])
|
||||
|
||||
cmd.extend(['fetch', '-m', manifest, '-o'])
|
||||
if self.topsrcdir:
|
||||
cmd.extend(['--tooltool-manifest', manifest])
|
||||
else:
|
||||
cmd.extend(['fetch', '-m', manifest, '-o'])
|
||||
|
||||
if cache:
|
||||
cmd.extend(['-c', cache])
|
||||
cmd.extend(['--cache-dir' if self.topsrcdir else '-c', cache])
|
||||
|
||||
# when mock is enabled run tooltool in mock. We can't use
|
||||
# run_command_m in all cases because it won't exist unless
|
||||
|
|
|
@ -1033,30 +1033,35 @@ class DesktopSingleLocale(LocalesMixin, ReleaseMixin, MockMixin, BuildbotMixin,
|
|||
return fn
|
||||
|
||||
def _run_tooltool(self):
|
||||
env = self.query_bootstrap_env()
|
||||
config = self.config
|
||||
dirs = self.query_abs_dirs()
|
||||
if not config.get('tooltool_manifest_src'):
|
||||
return self.warning(ERROR_MSGS['tooltool_manifest_undetermined'])
|
||||
fetch_script_path = os.path.join(dirs['abs_tools_dir'],
|
||||
'scripts/tooltool/tooltool_wrapper.sh')
|
||||
tooltool_manifest_path = os.path.join(dirs['abs_mozilla_dir'],
|
||||
config['tooltool_manifest_src'])
|
||||
python = self.query_exe('python2.7')
|
||||
cmd = [
|
||||
'sh',
|
||||
fetch_script_path,
|
||||
python, '-u',
|
||||
os.path.join(dirs['abs_mozilla_dir'], 'mach'),
|
||||
'artifact',
|
||||
'toolchain',
|
||||
'-v',
|
||||
'--retry', '4',
|
||||
'--tooltool-manifest',
|
||||
tooltool_manifest_path,
|
||||
'--tooltool-url',
|
||||
config['tooltool_url'],
|
||||
config['tooltool_bootstrap'],
|
||||
]
|
||||
cmd.extend(config['tooltool_script'])
|
||||
auth_file = self._get_tooltool_auth_file()
|
||||
if auth_file and os.path.exists(auth_file):
|
||||
cmd.extend(['--authentication-file', auth_file])
|
||||
cache = config['bootstrap_env'].get('TOOLTOOL_CACHE')
|
||||
if cache:
|
||||
cmd.extend(['-c', cache])
|
||||
cmd.extend(['--cache-dir', cache])
|
||||
self.info(str(cmd))
|
||||
self.run_command(cmd, cwd=dirs['abs_mozilla_dir'], halt_on_failure=True)
|
||||
self.run_command(cmd, cwd=dirs['abs_mozilla_dir'], halt_on_failure=True,
|
||||
env=env)
|
||||
|
||||
def funsize_props(self):
|
||||
"""Set buildbot properties required to trigger funsize tasks
|
||||
|
|
Загрузка…
Ссылка в новой задаче