Bug 1435729 - Always use vendored tooltool.py; r=jlund

Previously, we were downloading tooltool.py from random servers.
Considering tooltool.py is used to secure the download of future
components, downloading tooltool.py from potentially 3rd party
services was a major lapse in our end-to-end security, as a
compromised tooltool.py wouldn't honor integrity checks.

This commit copies the already vendored copy of tooltool.py into
the mozharness directory. A copy needs to be in the mozharness
directory because then a copy of mozharness without access to
a source checkout will have access to it.

We modify the code in mozharness that fetches tooltool to use
the copy from mozharness (unless `mach artifact toolchain` is
available).

Since a copy of tooltool.py is always reliably available, we
can remove all config entries related to tooltool.py.

MozReview-Commit-ID: C7ls1xWrPMq

--HG--
rename : python/mozbuild/mozbuild/action/tooltool.py => testing/mozharness/external_tools/tooltool.py
extra : rebase_source : d7b48d837805f9312c97b6e21c6527cc5f5018dc
This commit is contained in:
Gregory Szorc 2018-02-07 14:37:48 -08:00
parent 55ed962925
commit 9e795ff565
50 changed files with 1047 additions and 128 deletions

View File

@ -23,7 +23,6 @@ config = {
"emulator_extra_args": "-show-kernel -debug init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket",
"exes": {
'adb': '%(abs_work_dir)s/android-sdk-linux/platform-tools/adb',
'tooltool.py': ['python', '/builds/worker/scripts/tooltool.py'],
},
"env": {
"DISPLAY": ":0.0",

View File

@ -20,7 +20,6 @@ config = {
"emulator_extra_args": "-show-kernel -debug init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket -qemu -m 1024",
"exes": {
'adb': '%(abs_work_dir)s/android-sdk18/platform-tools/adb',
'tooltool.py': ['python', '/builds/worker/scripts/tooltool.py'],
},
"env": {
"DISPLAY": ":0.0",

View File

@ -16,7 +16,6 @@ INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.tar.bz2")
config = {
"log_name": "awsy",
"binary_path": BINARY_PATH,
"download_tooltool": True,
"installer_path": INSTALLER_PATH,
"virtualenv_path": VENV_PATH,
"find_links": [

View File

@ -9,7 +9,6 @@ INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.dmg")
config = {
"log_name": "awsy",
"download_tooltool": True,
"installer_path": INSTALLER_PATH,
"virtualenv_path": VENV_PATH,
"find_links": [

View File

@ -13,7 +13,6 @@ config = {
"exes": {
'python': sys.executable,
'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
'tooltool.py': [sys.executable, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
},
"proxxy": {},

View File

@ -37,7 +37,6 @@ config = {
"postflight_run_cmd_suites": [],
# Tooltool related
"download_tooltool": True,
"tooltool_cache": os.path.join(LOCAL_WORKDIR, "builds/tooltool_cache"),
"tooltool_cache_path": os.path.join(LOCAL_WORKDIR, "builds/tooltool_cache"),
"tooltool_authentication_file": os.path.join(LOCAL_WORKDIR, "relengapi.tok"),

View File

@ -12,7 +12,6 @@ config = {
# mozcrash support
'download_minidump_stackwalk': True,
'download_symbols': 'ondemand',
'download_tooltool': True,
# Disable proxxy because it isn't present in the QA environment.
'proxxy': {},

View File

@ -29,5 +29,4 @@ config = {
# mozcrash support
'download_minidump_stackwalk': True,
'download_symbols': 'ondemand',
'download_tooltool': True,
}

View File

@ -4,10 +4,6 @@
config = {
"vcs_share_base": "/builds/hg-shared",
"exes": {
'tooltool.py': "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pub.build.mozilla.org/pub",
],

View File

@ -10,7 +10,6 @@ config = {
"exes": {
'python': sys.executable,
'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
'tooltool.py': [sys.executable, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
},

View File

@ -9,9 +9,6 @@ config = {
"test_manifest": "unit-tests.ini",
"vcs_share_base": HG_SHARE_BASE_DIR,
"exes": {
'tooltool.py': "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pvt.build.mozilla.org/pub",

View File

@ -1,6 +1,5 @@
# This is a template config file for marionette production on Windows.
import os
import sys
config = {
# marionette options
@ -14,7 +13,6 @@ config = {
'hg': 'c:/mozilla-build/hg/hg',
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
},
"find_links": [

View File

@ -12,7 +12,6 @@ config = {
"exes": {
'python': sys.executable,
'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
'tooltool.py': [sys.executable, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
},

View File

@ -22,7 +22,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'dump_syms_binary': 'dump_syms',
@ -37,7 +36,6 @@ config = {
'mock_files': [
('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
],
'operating_system': 'android',
'partial_env': {

View File

@ -22,7 +22,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'dump_syms_binary': 'dump_syms',
@ -37,7 +36,6 @@ config = {
'mock_files': [
('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
],
'operating_system': 'android',
'partial_env': {

View File

@ -22,7 +22,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'avoid_avx2': True,
@ -38,7 +37,6 @@ config = {
'mock_files': [
('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
],
'operating_system': 'android',
'partial_env': {

View File

@ -12,7 +12,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'dump_syms_binary': 'dump_syms',
@ -26,7 +25,6 @@ config = {
'mock_files': [
('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
],
'operating_system': 'linux',
}

View File

@ -12,7 +12,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'dump_syms_binary': 'dump_syms',
@ -26,7 +25,6 @@ config = {
'mock_files': [
('/home/cltbld/.ssh', '/home/mock_mozilla/.ssh'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
],
'operating_system': 'linux',
}

View File

@ -12,7 +12,6 @@ config = {
'tooltool_cache': "/builds/tooltool_cache",
'exes': {
'gittool.py': [os.path.join(external_tools_path, 'gittool.py')],
'tooltool.py': "/builds/tooltool.py",
'python2.7': "/tools/python27/bin/python2.7",
},
'dump_syms_binary': 'dump_syms',

View File

@ -14,7 +14,6 @@ config = {
'exes': {
'gittool.py': [sys.executable, os.path.join(external_tools_path, 'gittool.py')],
'python2.7': 'c:\\mozilla-build\\python27\\python2.7.exe',
'tooltool.py': [sys.executable, "c:\\mozilla-build\\tooltool.py"],
},
'dump_syms_binary': 'dump_syms.exe',
'arch': 'x86',

View File

@ -14,7 +14,6 @@ config = {
'exes': {
'gittool.py': [sys.executable, os.path.join(external_tools_path, 'gittool.py')],
'python2.7': 'c:\\mozilla-build\\python27\\python2.7.exe',
'tooltool.py': [sys.executable, "c:\\mozilla-build\\tooltool.py"],
},
'dump_syms_binary': 'dump_syms.exe',
'arch': 'x64',

View File

@ -23,9 +23,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"repo": "https://hg.mozilla.org/projects/ash",
"branch": "default",
@ -87,7 +84,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -23,9 +23,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
@ -87,7 +84,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -22,9 +22,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
@ -84,7 +81,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -23,9 +23,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
@ -85,7 +82,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -25,9 +25,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
@ -91,7 +88,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -29,9 +29,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"repo": "https://hg.mozilla.org/releases/mozilla-beta",
"branch": "default",
@ -83,7 +80,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
('/builds/mozilla-fennec-geoloc-api.key', '/builds/mozilla-fennec-geoloc-api.key'),
('/builds/adjust-sdk-beta.token', '/builds/adjust-sdk-beta.token'),

View File

@ -25,9 +25,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
@ -91,7 +88,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -29,9 +29,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"repo": "https://hg.mozilla.org/releases/mozilla-release",
"branch": "default",
@ -83,7 +80,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
('/builds/mozilla-fennec-geoloc-api.key', '/builds/mozilla-fennec-geoloc-api.key'),
('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),

View File

@ -24,9 +24,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"repo": "https://hg.mozilla.org/%(user_repo_override)s/mozilla-beta",
"branch": "default",
@ -85,7 +82,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
('/builds/mozilla-fennec-geoloc-api.key', '/builds/mozilla-fennec-geoloc-api.key'),
('/builds/adjust-sdk-beta.token', '/builds/adjust-sdk-beta.token'),

View File

@ -24,9 +24,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"repos": [{
"repo": "https://hg.mozilla.org/%(user_repo_override)s/mozilla-release",
"branch": "default",
@ -85,7 +82,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
('/builds/mozilla-fennec-geoloc-api.key', '/builds/mozilla-fennec-geoloc-api.key'),
('/builds/adjust-sdk.token', '/builds/adjust-sdk.token'),

View File

@ -22,9 +22,6 @@ config = {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"update_gecko_source_to_enUS": False,
"nightly_build": True,
"repos": [{
@ -89,7 +86,6 @@ config = {
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

View File

@ -13,7 +13,6 @@ else:
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
exes = {
'tooltool.py': ["/builds/tooltool.py"],
'python': PYTHON,
}
ABS_WORK_DIR = os.path.join(os.getcwd(), "build")
@ -22,7 +21,6 @@ INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.tar.bz2")
config = {
"log_name": "talos",
"buildbot_json_path": "buildprops.json",
"download_tooltool": True,
"installer_path": INSTALLER_PATH,
"virtualenv_path": VENV_PATH,
"find_links": [

View File

@ -9,10 +9,6 @@ else:
TOOLTOOL_MANIFEST_PATH = "config/tooltool-manifests/linux32/releng.manifest"
MINIDUMP_STACKWALK_PATH = "linux32-minidump_stackwalk"
exes = {
'tooltool.py': "/tools/tooltool.py",
}
config = {
"log_name": "talos",
"buildbot_json_path": "buildprops.json",
@ -23,7 +19,6 @@ config = {
"http://pypi.pub.build.mozilla.org/pub",
],
"pip_index": False,
"exes": exes,
"title": os.uname()[1].lower().split('.')[0],
"default_actions": [
"clobber",

View File

@ -22,9 +22,6 @@ config = {
"http://pypi.pub.build.mozilla.org/pub",
],
"pip_index": False,
"exes": {
'tooltool.py': "/tools/tooltool.py",
},
"title": os.uname()[1].lower().split('.')[0],
"default_actions": [
"clobber",

View File

@ -24,7 +24,6 @@ config = {
'mozinstall': ['%s/scripts/python' % VENV_PATH,
'%s/scripts/mozinstall-script.py' % VENV_PATH],
'hg': 'c:/mozilla-build/hg/hg',
'tooltool.py': [PYTHON, 'C:/mozilla-build/tooltool.py'],
},
"title": socket.gethostname().split('.')[0],
"default_actions": [

View File

@ -22,7 +22,6 @@ config = {
'mozinstall': ['%s/scripts/python' % VENV_PATH,
'%s/scripts/mozinstall-script.py' % VENV_PATH],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
'tooltool.py': [PYTHON, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
},
"title": socket.gethostname().split('.')[0],
"default_actions": [

View File

@ -25,7 +25,6 @@ config = {
'mozinstall': ['%s/scripts/python' % VENV_PATH,
'%s/scripts/mozinstall-script.py' % VENV_PATH],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
'tooltool.py': [PYTHON, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
},
"title": socket.gethostname().split('.')[0],
"default_actions": [

View File

@ -35,9 +35,6 @@ else:
#####
config = {
"buildbot_json_path": "buildprops.json",
"exes": {
"tooltool.py": "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pvt.build.mozilla.org/pub",
"http://pypi.pub.build.mozilla.org/pub",

View File

@ -9,9 +9,6 @@ ADJUST_MOUSE_AND_SCREEN = False
#####
config = {
"buildbot_json_path": "buildprops.json",
"exes": {
'tooltool.py': "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pvt.build.mozilla.org/pub",
"http://pypi.pub.build.mozilla.org/pub",

View File

@ -17,5 +17,4 @@ config = {
if platform.system() == "Linux":
config["exes"] = {
"python": "/tools/buildbot/bin/python",
"tooltool.py": "/tools/tooltool.py",
}

View File

@ -25,7 +25,6 @@ config = {
"exes": {
'python': sys.executable,
'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
'tooltool.py': [sys.executable, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
},
###

View File

@ -17,7 +17,6 @@ config = {
'hg': 'c:/mozilla-build/hg/hg',
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
},
###
"installer_path": INSTALLER_PATH,

View File

@ -16,10 +16,6 @@ config = {
"--certutil-binary=%(test_install_path)s/bin/certutil",
],
"exes": {
'tooltool.py': "/tools/tooltool.py",
},
"find_links": [
"http://pypi.pvt.build.mozilla.org/pub",
"http://pypi.pub.build.mozilla.org/pub",
@ -37,8 +33,6 @@ config = {
"download_minidump_stackwalk": True,
"download_tooltool": True,
# this would normally be in "exes", but "exes" is clobbered by remove_executables
"geckodriver": "%(abs_test_bin_dir)s/geckodriver",

View File

@ -25,7 +25,6 @@ config = {
'hg': 'c:/mozilla-build/hg/hg',
'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
'%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
},
"find_links": [

View File

@ -23,7 +23,6 @@ config = {
"exes": {
'python': sys.executable,
'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
'tooltool.py': [sys.executable, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
},

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,11 @@ from mozharness.base.script import (
PreScriptAction,
PostScriptAction,
)
from mozharness.mozilla.tooltool import TooltoolMixin
_here = os.path.abspath(os.path.dirname(__file__))
_tooltool_path = os.path.normpath(os.path.join(_here, '..', '..', '..',
'external_tools',
'tooltool.py'))
code_coverage_config_options = [
[["--code-coverage"],
@ -122,8 +126,7 @@ class CodeCoverageMixin(object):
manifest = os.path.join(dirs.get('abs_test_install_dir', os.path.join(dirs['abs_work_dir'], 'tests')), \
'config/tooltool-manifests/%s/ccov.manifest' % platform)
tooltool_path = self._fetch_tooltool_py()
cmd = [sys.executable, tooltool_path, '--url', 'https://tooltool.mozilla-releng.net/', 'fetch', \
cmd = [sys.executable, _tooltool_path, '--url', 'https://tooltool.mozilla-releng.net/', 'fetch', \
'-m', manifest, '-o', '-c', '/builds/worker/tooltool-cache']
self.run_command(cmd, cwd=self.grcov_dir)

View File

@ -11,13 +11,13 @@ TooltoolErrorList = PythonErrorList + [{
}]
TOOLTOOL_PY_URL = \
"https://raw.githubusercontent.com/mozilla/build-tooltool/master/tooltool.py"
TOOLTOOL_SERVERS = [
'https://tooltool.mozilla-releng.net/',
]
_here = os.path.abspath(os.path.dirname(__file__))
_external_tools_path = os.path.normpath(os.path.join(_here, '..', '..',
'external_tools'))
class TooltoolMixin(object):
"""Mixin class for handling tooltool manifests.
@ -50,7 +50,6 @@ class TooltoolMixin(object):
for d in (output_dir, cache):
if d is not None and not os.path.exists(d):
self.mkdir_p(d)
# Use vendored tooltool.py if available.
if self.topsrcdir:
cmd = [
sys.executable, '-u',
@ -59,10 +58,11 @@ class TooltoolMixin(object):
'toolchain',
'-v',
]
elif self.config.get("download_tooltool"):
cmd = [sys.executable, self._fetch_tooltool_py()]
else:
cmd = self.query_exe('tooltool.py', return_type='list')
cmd = [
sys.executable, '-u',
os.path.join(_external_tools_path, 'tooltool.py'),
]
# get the tooltool servers from configuration
default_urls = self.config.get('tooltool_servers', TOOLTOOL_SERVERS)
@ -120,17 +120,6 @@ class TooltoolMixin(object):
error_level=FATAL,
)
def _fetch_tooltool_py(self):
""" Retrieve tooltool.py
"""
dirs = self.query_abs_dirs()
file_path = os.path.join(dirs['abs_work_dir'], "tooltool.py")
self.download_file(TOOLTOOL_PY_URL, file_path)
if not os.path.exists(file_path):
self.fatal("We can't get tooltool.py")
self.chmod(file_path, 0755)
return file_path
def create_tooltool_manifest(self, contents, path=None):
""" Currently just creates a manifest, given the contents.
We may want a template and individual values in the future?

View File

@ -71,7 +71,6 @@ class TalosRunner(MozbuildObject):
},
'title': socket.gethostname(),
'default_actions': default_actions,
'download_tooltool': True,
'talos_extra_options': ['--develop'] + self.talos_args,
'python3_manifest': {
'win32': 'python3.manifest',