tools/mb: remove refenrences to goma
goma is not used anymore. Bug: 41489832 Change-Id: I5da6732ceac98113a4ee24be5bbbd5f5266b6bda Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5540996 Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Reviewed-by: Junji Watanabe <jwata@google.com> Commit-Queue: Takuto Ikuta <tikuta@chromium.org> Cr-Commit-Position: refs/heads/main@{#1301158}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
b644120309
commit
f91b4b2857
tools/mb
@ -43,7 +43,7 @@ a single object with the following fields:
|
||||
no tests that will be run.
|
||||
* `additional_compile_targets`: an array of (ninja) build targets that
|
||||
reflect the stuff we might want to build *in addition to* the list
|
||||
passed in `test_targets`. Targets in this list will be treated
|
||||
passed in `test_targets`. Targets in this list will be treated
|
||||
specially, in the following way: if a given target is a "meta"
|
||||
(GN: group) target like 'blink_tests' or or even the
|
||||
ninja-specific 'all' target, then only the *dependencies* of the
|
||||
@ -65,7 +65,7 @@ fields:
|
||||
* `compile_targets`: the list of ninja targets that should be passed
|
||||
directly to the corresponding ninja / compile.py invocation. This
|
||||
list may contain entries that are *not* listed in the input (see
|
||||
the description of `additional_compile_targets` above and
|
||||
the description of `additional_compile_targets` above and
|
||||
[design_spec.md](the design spec) for how this works).
|
||||
* `invalid_targets`: a list of any targets that were passed in
|
||||
either of the input lists that weren't actually found in the graph.
|
||||
@ -124,10 +124,6 @@ You can pass the `-q/--quiet` flag to get mb to be silent unless there is an
|
||||
error, and pass the `-v/--verbose` flag to get mb to log all of the files
|
||||
that are read and written, and all the commands that are run.
|
||||
|
||||
If the build config will use the Goma distributed-build system, you can pass
|
||||
the path to your Goma client in the `-g/--goma-dir` flag, and it will be
|
||||
incorporated into the appropriate flags for GN as needed.
|
||||
|
||||
### mb help
|
||||
|
||||
Produces help output on the other subcommands
|
||||
@ -280,7 +276,7 @@ For example, if you had:
|
||||
}
|
||||
'mixins': {
|
||||
'bot': {
|
||||
'gn_args': 'use_goma=true dcheck_always_on=false',
|
||||
'gn_args': 'use_remoteexec=true dcheck_always_on=false',
|
||||
},
|
||||
'debug': {
|
||||
'gn_args': 'is_debug=true',
|
||||
@ -302,7 +298,7 @@ For example, if you had:
|
||||
```
|
||||
|
||||
and you ran `mb gen -c linux_release_trybot //out/Release`, it would
|
||||
translate into a call to `gn --args="use_goma=true dcheck_always_on=false dcheck_always_on=true"`.
|
||||
translate into a call to `gn --args="use_remoteexec=true dcheck_always_on=false dcheck_always_on=true"`.
|
||||
|
||||
(From that you can see that mb is intentionally dumb and does not
|
||||
attempt to de-dup the flags, it lets GN do that).
|
||||
@ -320,5 +316,3 @@ If you hit weirder things than that, add some print statements to the
|
||||
python script, send a question to gn-dev@chromium.org, or
|
||||
[file a bug](https://crbug.com/new) with the label
|
||||
'mb' and cc: dpranke@chromium.org.
|
||||
|
||||
|
||||
|
@ -159,7 +159,6 @@ class MetaBuildWrapper:
|
||||
metavar='PATH',
|
||||
help=('path to config file '
|
||||
'(default is mb_config.pyl'))
|
||||
subp.add_argument('-g', '--goma-dir', help='path to goma directory')
|
||||
subp.add_argument('--android-version-code',
|
||||
help='Sets GN arg android_default_version_code')
|
||||
subp.add_argument('--android-version-name',
|
||||
@ -1360,12 +1359,7 @@ class MetaBuildWrapper:
|
||||
self.Print(out)
|
||||
return ret
|
||||
|
||||
runtime_deps = []
|
||||
for l in out.splitlines():
|
||||
# FIXME: Can remove this check if/when use_goma is removed.
|
||||
if 'The gn arg use_goma=true will be deprecated by EOY 2023' not in l:
|
||||
runtime_deps.append(l)
|
||||
runtime_deps = self._DedupDependencies(runtime_deps)
|
||||
runtime_deps = self._DedupDependencies(out.splitlines())
|
||||
|
||||
ret = self.WriteIsolateFiles(build_dir, command, target, runtime_deps, vals,
|
||||
extra_files)
|
||||
@ -1548,9 +1542,6 @@ class MetaBuildWrapper:
|
||||
valuese them will be included."""
|
||||
gn_args = vals['gn_args']
|
||||
|
||||
if self.args.goma_dir:
|
||||
gn_args += ' goma_dir="%s"' % self.args.goma_dir
|
||||
|
||||
android_version_code = self.args.android_version_code
|
||||
if android_version_code:
|
||||
gn_args += ' android_default_version_code="%s"' % android_version_code
|
||||
|
@ -304,23 +304,8 @@
|
||||
},
|
||||
|
||||
'tryserver.chromium.perf': {
|
||||
'Android Compile Perf': 'official_goma_minimal_symbols_android',
|
||||
'Android Compile Perf PGO': 'official_goma_minimal_symbols_android_pgo',
|
||||
'Android arm64 Compile Perf': 'official_minimal_symbols_android_arm64',
|
||||
'Android arm64 Compile Perf PGO': 'official_goma_minimal_symbols_android_arm64_pgo',
|
||||
'Android arm64 High End Compile Perf': 'official_goma_minimal_symbols_android_arm64_high_end',
|
||||
'Android arm64 High End Compile Perf PGO': 'official_goma_minimal_symbols_android_arm64_high_end_pgo',
|
||||
'Chromeos Amd64 Generic Lacros Builder Perf': 'chromeos_amd64-generic_lacros_official',
|
||||
'Fuchsia Builder Perf': 'official_goma_fuchsia_arm64_perf',
|
||||
'Fuchsia Builder Perf x64': 'official_goma_fuchsia_x64_perf',
|
||||
'Linux Builder Perf': 'official_linux_perf',
|
||||
'Linux Builder Perf PGO': 'official_goma_linux_perf_pgo',
|
||||
'Mac Builder Perf': 'official_goma_mac_perf',
|
||||
'Mac Builder Perf PGO': 'official_goma_mac_perf_pgo',
|
||||
'Mac arm Builder Perf': 'official_goma_mac_arm_perf',
|
||||
'Mac arm Builder Perf PGO': 'official_goma_mac_arm_perf_pgo',
|
||||
'Win x64 Builder Perf': 'official_goma_perf',
|
||||
'Win x64 Builder Perf PGO': 'official_goma_perf_pgo',
|
||||
},
|
||||
|
||||
'tryserver.devtools-frontend': {
|
||||
@ -404,10 +389,6 @@
|
||||
'chrome_branded', 'minimal_symbols', 'release_bot_reclient',
|
||||
],
|
||||
|
||||
'chromeos_amd64-generic_lacros_official': [
|
||||
'chromeos_amd64-generic-crostoolchain', 'lacros', 'official', 'minimal_symbols', 'cfi', 'thin_lto', 'no_reclient', 'goma',
|
||||
],
|
||||
|
||||
'chromeos_amd64-generic_lacros_official_reclient': [
|
||||
'chromeos_amd64-generic-crostoolchain_reclient', 'lacros', 'official', 'minimal_symbols', 'cfi', 'thin_lto',
|
||||
],
|
||||
@ -692,62 +673,6 @@
|
||||
'fuchsia', 'official', 'x64', 'custom_args',
|
||||
],
|
||||
|
||||
'official_goma_fuchsia_arm64_perf': [
|
||||
'cast_receiver_size_optimized_internal', 'official', 'goma', 'minimal_symbols', 'fuchsia', 'fuchsia_include_sd_images', 'arm64', 'ffmpeg_branding_chrome', 'proprietary_codecs', 'test_isolate_no_emulator'
|
||||
],
|
||||
|
||||
'official_goma_fuchsia_x64_perf': [
|
||||
'official', 'goma', 'minimal_symbols', 'fuchsia', 'x64', 'ffmpeg_branding_chrome', 'proprietary_codecs', 'test_isolate_no_emulator', 'fuchsia_chrome'
|
||||
],
|
||||
|
||||
'official_goma_linux_perf_pgo': [
|
||||
'official', 'goma', 'no_gnome_keyring', 'minimal_symbols',
|
||||
],
|
||||
|
||||
'official_goma_mac_arm_perf': [
|
||||
'official', 'goma', 'no_keystone_registration_framework', 'no_widevine_cdm_host_verification', 'minimal_symbols', 'arm64', 'pgo_phase_0',
|
||||
],
|
||||
|
||||
'official_goma_mac_arm_perf_pgo': [
|
||||
'official', 'goma', 'no_keystone_registration_framework', 'no_widevine_cdm_host_verification', 'minimal_symbols', 'arm64',
|
||||
],
|
||||
|
||||
'official_goma_mac_perf': [
|
||||
'official', 'goma', 'no_keystone_registration_framework', 'no_widevine_cdm_host_verification', 'minimal_symbols', 'pgo_phase_0',
|
||||
],
|
||||
|
||||
'official_goma_mac_perf_pgo': [
|
||||
'official', 'goma', 'no_keystone_registration_framework', 'no_widevine_cdm_host_verification', 'minimal_symbols',
|
||||
],
|
||||
|
||||
'official_goma_minimal_symbols_android': [
|
||||
'official', 'goma', 'minimal_symbols', 'android', 'pgo_phase_0', 'no_default_afdo'
|
||||
],
|
||||
|
||||
'official_goma_minimal_symbols_android_arm64_high_end': [
|
||||
'official', 'goma', 'minimal_symbols', 'android', 'arm64', 'pgo_phase_0', 'no_default_afdo', 'android_high_end'
|
||||
],
|
||||
|
||||
'official_goma_minimal_symbols_android_arm64_high_end_pgo': [
|
||||
'official', 'goma', 'minimal_symbols', 'android', 'arm64', 'no_default_afdo', 'android_high_end'
|
||||
],
|
||||
|
||||
'official_goma_minimal_symbols_android_arm64_pgo': [
|
||||
'official', 'goma', 'minimal_symbols', 'android', 'arm64', 'android_low_end'
|
||||
],
|
||||
|
||||
'official_goma_minimal_symbols_android_pgo': [
|
||||
'official', 'goma', 'minimal_symbols', 'android'
|
||||
],
|
||||
|
||||
'official_goma_perf': [
|
||||
'official', 'goma', 'minimal_symbols', 'pgo_phase_0',
|
||||
],
|
||||
|
||||
'official_goma_perf_pgo': [
|
||||
'official', 'goma', 'minimal_symbols',
|
||||
],
|
||||
|
||||
'official_lacros_amd64_pgo': [
|
||||
'official', 'release', 'lacros', 'amd64-generic-crostoolchain', 'chromeos_device_reclient', 'no_symbols', 'pgo_phase_1',
|
||||
],
|
||||
@ -1260,10 +1185,6 @@
|
||||
'gn_args': 'target_os="fuchsia"',
|
||||
},
|
||||
|
||||
'fuchsia_chrome': {
|
||||
'gn_args': 'fuchsia_browser_type="chrome"',
|
||||
},
|
||||
|
||||
'fuchsia_include_sd_images': {
|
||||
'gn_args': 'fuchsia_additional_boot_images=["//third_party/fuchsia-sdk/images-internal/astro-release/","//third_party/fuchsia-sdk/images-internal/sherlock-release/","//third_party/fuchsia-sdk/images-internal/nelson-release/"]',
|
||||
},
|
||||
@ -1272,10 +1193,6 @@
|
||||
'gn_args': 'symbol_level=2',
|
||||
},
|
||||
|
||||
'goma': {
|
||||
'gn_args': 'use_goma=true',
|
||||
},
|
||||
|
||||
'gpu_tests': {
|
||||
'mixins': ['chrome_with_codecs'],
|
||||
},
|
||||
@ -1345,10 +1262,6 @@
|
||||
'gn_args': 'enable_keystone_registration_framework=false',
|
||||
},
|
||||
|
||||
'no_reclient': {
|
||||
'gn_args': 'use_remoteexec=false',
|
||||
},
|
||||
|
||||
'no_symbols': {
|
||||
'gn_args': 'symbol_level=0',
|
||||
},
|
||||
|
@ -1,31 +1,4 @@
|
||||
{
|
||||
"Android Compile Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
"clang_use_default_sample_profile": false,
|
||||
"debuggable_apks": false,
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"strip_absolute_paths_from_debug_symbols": true,
|
||||
"symbol_level": 1,
|
||||
"target_os": "android",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Android Compile Perf PGO": {
|
||||
"gn_args": {
|
||||
"debuggable_apks": false,
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"symbol_level": 1,
|
||||
"target_os": "android",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Android arm64 Compile Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
@ -43,102 +16,6 @@
|
||||
"use_remoteexec": true
|
||||
}
|
||||
},
|
||||
"Android arm64 Compile Perf PGO": {
|
||||
"gn_args": {
|
||||
"debuggable_apks": false,
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_high_end_android": false,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"target_os": "android",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Android arm64 High End Compile Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
"clang_use_default_sample_profile": false,
|
||||
"debuggable_apks": false,
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_high_end_android": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"strip_absolute_paths_from_debug_symbols": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"target_os": "android",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Android arm64 High End Compile Perf PGO": {
|
||||
"gn_args": {
|
||||
"clang_use_default_sample_profile": false,
|
||||
"debuggable_apks": false,
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_high_end_android": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"target_os": "android",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Chromeos Amd64 Generic Lacros Builder Perf": {
|
||||
"args_file": "//build/args/chromeos/amd64-generic-crostoolchain.gni",
|
||||
"gn_args": {
|
||||
"chromeos_is_browser_only": true,
|
||||
"dcheck_always_on": false,
|
||||
"is_cfi": true,
|
||||
"is_chrome_branded": true,
|
||||
"is_chromeos_device": true,
|
||||
"is_official_build": true,
|
||||
"ozone_platform_headless": true,
|
||||
"symbol_level": 1,
|
||||
"target_os": "chromeos",
|
||||
"use_goma": true,
|
||||
"use_remoteexec": false,
|
||||
"use_thin_lto": true
|
||||
}
|
||||
},
|
||||
"Fuchsia Builder Perf": {
|
||||
"args_file": "//build/config/fuchsia/size_optimized_cast_receiver_args_internal.gn",
|
||||
"gn_args": {
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"fuchsia_additional_boot_images": [
|
||||
"//third_party/fuchsia-sdk/images-internal/astro-release/",
|
||||
"//third_party/fuchsia-sdk/images-internal/sherlock-release/",
|
||||
"//third_party/fuchsia-sdk/images-internal/nelson-release/"
|
||||
],
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"target_os": "fuchsia",
|
||||
"test_isolate_uses_emulator": false,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Fuchsia Builder Perf x64": {
|
||||
"gn_args": {
|
||||
"ffmpeg_branding": "Chrome",
|
||||
"fuchsia_browser_type": "chrome",
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"proprietary_codecs": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "x64",
|
||||
"target_os": "fuchsia",
|
||||
"test_isolate_uses_emulator": false,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Linux Builder Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
@ -149,78 +26,5 @@
|
||||
"use_gnome_keyring": false,
|
||||
"use_remoteexec": true
|
||||
}
|
||||
},
|
||||
"Linux Builder Perf PGO": {
|
||||
"gn_args": {
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"symbol_level": 1,
|
||||
"use_gnome_keyring": false,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Mac Builder Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
"enable_keystone_registration_framework": false,
|
||||
"ignore_missing_widevine_signing_cert": true,
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"strip_absolute_paths_from_debug_symbols": true,
|
||||
"symbol_level": 1,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Mac Builder Perf PGO": {
|
||||
"gn_args": {
|
||||
"enable_keystone_registration_framework": false,
|
||||
"ignore_missing_widevine_signing_cert": true,
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"symbol_level": 1,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Mac arm Builder Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
"enable_keystone_registration_framework": false,
|
||||
"ignore_missing_widevine_signing_cert": true,
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"strip_absolute_paths_from_debug_symbols": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Mac arm Builder Perf PGO": {
|
||||
"gn_args": {
|
||||
"enable_keystone_registration_framework": false,
|
||||
"ignore_missing_widevine_signing_cert": true,
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"symbol_level": 1,
|
||||
"target_cpu": "arm64",
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Win x64 Builder Perf": {
|
||||
"gn_args": {
|
||||
"chrome_pgo_phase": 0,
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"strip_absolute_paths_from_debug_symbols": true,
|
||||
"symbol_level": 1,
|
||||
"use_goma": true
|
||||
}
|
||||
},
|
||||
"Win x64 Builder Perf PGO": {
|
||||
"gn_args": {
|
||||
"is_chrome_branded": true,
|
||||
"is_official_build": true,
|
||||
"symbol_level": 1,
|
||||
"use_goma": true
|
||||
}
|
||||
}
|
||||
}
|
@ -159,19 +159,19 @@ TEST_CONFIG = """\
|
||||
'chromium': {},
|
||||
'fake_builder_group': {
|
||||
'fake_args_bot': 'fake_args_bot',
|
||||
'fake_args_file': 'args_file_goma',
|
||||
'fake_args_file': 'args_file_remoteexec',
|
||||
'fake_builder': 'rel_bot',
|
||||
'fake_debug_builder': 'debug_goma',
|
||||
'fake_debug_builder': 'debug_remoteexec',
|
||||
'fake_multi_phase': { 'phase_1': 'phase_1', 'phase_2': 'phase_2'},
|
||||
},
|
||||
},
|
||||
'configs': {
|
||||
'args_file_goma': ['fake_args_bot', 'goma'],
|
||||
'debug_goma': ['debug', 'goma'],
|
||||
'args_file_remoteexec': ['fake_args_bot', 'remoteexec'],
|
||||
'debug_remoteexec': ['debug', 'remoteexec'],
|
||||
'fake_args_bot': ['fake_args_bot'],
|
||||
'phase_1': ['rel', 'phase_1'],
|
||||
'phase_2': ['rel', 'phase_2'],
|
||||
'rel_bot': ['rel', 'goma', 'fake_feature1'],
|
||||
'rel_bot': ['rel', 'remoteexec', 'fake_feature1'],
|
||||
},
|
||||
'mixins': {
|
||||
'debug': {
|
||||
@ -183,9 +183,6 @@ TEST_CONFIG = """\
|
||||
'fake_feature1': {
|
||||
'gn_args': 'enable_doom_melon=true',
|
||||
},
|
||||
'goma': {
|
||||
'gn_args': 'use_goma=true',
|
||||
},
|
||||
'phase_1': {
|
||||
'gn_args': 'phase=1',
|
||||
},
|
||||
@ -195,6 +192,9 @@ TEST_CONFIG = """\
|
||||
'rel': {
|
||||
'gn_args': 'is_debug=false dcheck_always_on=false',
|
||||
},
|
||||
'remoteexec': {
|
||||
'gn_args': 'use_remoteexec=true',
|
||||
},
|
||||
},
|
||||
}
|
||||
"""
|
||||
@ -412,8 +412,12 @@ class UnitTest(unittest.TestCase):
|
||||
mbw = self.fake_mbw(files)
|
||||
mbw.Call = lambda cmd, env=None, capture_output=True, input='': (0, '', '')
|
||||
|
||||
self.check(['analyze', '-c', 'debug_goma', '//out/Default',
|
||||
'/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'analyze', '-c', 'debug_remoteexec', '//out/Default', '/tmp/in.json',
|
||||
'/tmp/out.json'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
out = json.loads(mbw.files['/tmp/out.json'])
|
||||
self.assertEqual(out, {
|
||||
'status': 'Found dependency',
|
||||
@ -436,8 +440,12 @@ class UnitTest(unittest.TestCase):
|
||||
mbw = self.fake_mbw(files)
|
||||
mbw.Call = lambda cmd, env=None, capture_output=True, input='': (0, '', '')
|
||||
|
||||
self.check(['analyze', '-c', 'debug_goma', '//out/Default',
|
||||
'/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'analyze', '-c', 'debug_remoteexec', '//out/Default', '/tmp/in.json',
|
||||
'/tmp/out.json'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
out = json.loads(mbw.files['/tmp/out.json'])
|
||||
|
||||
# check that 'foo_unittests' is not in the compile_targets
|
||||
@ -459,8 +467,12 @@ class UnitTest(unittest.TestCase):
|
||||
mbw = self.fake_mbw(files)
|
||||
mbw.Call = lambda cmd, env=None, capture_output=True, input='': (0, '', '')
|
||||
|
||||
self.check(['analyze', '-c', 'debug_goma', '//out/Default',
|
||||
'/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'analyze', '-c', 'debug_remoteexec', '//out/Default', '/tmp/in.json',
|
||||
'/tmp/out.json'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
out = json.loads(mbw.files['/tmp/out.json'])
|
||||
|
||||
# crbug.com/736215: If GN returns a label containing a toolchain,
|
||||
@ -486,8 +498,12 @@ class UnitTest(unittest.TestCase):
|
||||
mbw = self.fake_mbw(files)
|
||||
mbw.Call = lambda cmd, env=None, capture_output=True, input='': (0, '', '')
|
||||
|
||||
self.check(['analyze', '-c', 'debug_goma', '//out/Default',
|
||||
'/tmp/in.json', '/tmp/out.json'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'analyze', '-c', 'debug_remoteexec', '//out/Default', '/tmp/in.json',
|
||||
'/tmp/out.json'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
out = json.loads(mbw.files['/tmp/out.json'])
|
||||
|
||||
# If GN returns so many compile targets that we might have command-line
|
||||
@ -498,12 +514,12 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
def test_gen(self):
|
||||
mbw = self.fake_mbw()
|
||||
self.check(['gen', '-c', 'debug_goma', '//out/Default', '-g', '/goma'],
|
||||
mbw=mbw, ret=0)
|
||||
self.check(['gen', '-c', 'debug_remoteexec', '//out/Default'],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
self.assertMultiLineEqual(mbw.files['/fake_src/out/Default/args.gn'],
|
||||
('goma_dir = "/goma"\n'
|
||||
'is_debug = true\n'
|
||||
'use_goma = true\n'))
|
||||
('is_debug = true\n'
|
||||
'use_remoteexec = true\n'))
|
||||
|
||||
# Make sure we log both what is written to args.gn and the command line.
|
||||
self.assertIn('Writing """', mbw.out)
|
||||
@ -511,12 +527,10 @@ class UnitTest(unittest.TestCase):
|
||||
mbw.out)
|
||||
|
||||
mbw = self.fake_mbw(win32=True)
|
||||
self.check(['gen', '-c', 'debug_goma', '-g', 'c:\\goma', '//out/Debug'],
|
||||
mbw=mbw, ret=0)
|
||||
self.check(['gen', '-c', 'debug_remoteexec', '//out/Debug'], mbw=mbw, ret=0)
|
||||
self.assertMultiLineEqual(mbw.files['c:\\fake_src\\out\\Debug\\args.gn'],
|
||||
('goma_dir = "c:\\\\goma"\n'
|
||||
'is_debug = true\n'
|
||||
'use_goma = true\n'))
|
||||
('is_debug = true\n'
|
||||
'use_remoteexec = true\n'))
|
||||
self.assertIn(
|
||||
'c:\\fake_src\\buildtools\\win\\gn.exe gen //out/Debug '
|
||||
'--check', mbw.out)
|
||||
@ -538,7 +552,7 @@ class UnitTest(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
mbw.files['/fake_src/out/Debug/args.gn'],
|
||||
('import("//build/args/bots/fake_builder_group/fake_args_bot.gn")\n'
|
||||
'use_goma = true\n'))
|
||||
'use_remoteexec = true\n'))
|
||||
|
||||
def test_gen_args_file_twice(self):
|
||||
mbw = self.fake_mbw()
|
||||
@ -549,7 +563,9 @@ class UnitTest(unittest.TestCase):
|
||||
def test_gen_fails(self):
|
||||
mbw = self.fake_mbw()
|
||||
mbw.Call = lambda cmd, env=None, capture_output=True, input='': (1, '', '')
|
||||
self.check(['gen', '-c', 'debug_goma', '//out/Default'], mbw=mbw, ret=1)
|
||||
self.check(['gen', '-c', 'debug_remoteexec', '//out/Default'],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
|
||||
def test_gen_swarming(self):
|
||||
files = {
|
||||
@ -575,12 +591,13 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
mbw.Call = fake_call
|
||||
|
||||
self.check(['gen',
|
||||
'-c', 'debug_goma',
|
||||
'--swarming-targets-file', '/tmp/swarming_targets',
|
||||
'//out/Default'], mbw=mbw, ret=0)
|
||||
self.assertIn('/fake_src/out/Default/base_unittests.isolate',
|
||||
mbw.files)
|
||||
self.check([
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
self.assertIn('/fake_src/out/Default/base_unittests.isolate', mbw.files)
|
||||
self.assertIn('/fake_src/out/Default/base_unittests.isolated.gen.json',
|
||||
mbw.files)
|
||||
|
||||
@ -608,14 +625,14 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
mbw.Call = fake_call
|
||||
|
||||
self.check(['gen',
|
||||
'-c', 'debug_goma',
|
||||
'--swarming-targets-file', '/tmp/swarming_targets',
|
||||
'--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl',
|
||||
'//out/Default'], mbw=mbw, ret=0)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolate',
|
||||
mbw.files)
|
||||
self.check([
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolate', mbw.files)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolated.gen.json',
|
||||
mbw.files)
|
||||
|
||||
@ -647,16 +664,15 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
mbw.Call = fake_call
|
||||
|
||||
self.check(['gen',
|
||||
'-c', 'debug_goma',
|
||||
'--swarming-targets-file', '/tmp/swarming_targets',
|
||||
'--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl',
|
||||
'--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map2.pyl',
|
||||
'//out/Default'], mbw=mbw, ret=0)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolate',
|
||||
mbw.files)
|
||||
self.check([
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl', '--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map2.pyl', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolate', mbw.files)
|
||||
self.assertIn('/fake_src/out/Default/cc_perftests.isolated.gen.json',
|
||||
mbw.files)
|
||||
|
||||
@ -680,14 +696,14 @@ class UnitTest(unittest.TestCase):
|
||||
}
|
||||
mbw = self.fake_mbw(files=files, win32=True)
|
||||
# Check that passing duplicate targets into mb fails.
|
||||
self.check(['gen',
|
||||
'-c', 'debug_goma',
|
||||
'--swarming-targets-file', '/tmp/swarming_targets',
|
||||
'--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl',
|
||||
'--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map2.pyl',
|
||||
'//out/Default'], mbw=mbw, ret=1)
|
||||
self.check([
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map.pyl', '--isolate-map-file',
|
||||
'/fake_src/testing/buildbot/gn_isolate_map2.pyl', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
|
||||
|
||||
def test_isolate(self):
|
||||
@ -702,8 +718,11 @@ class UnitTest(unittest.TestCase):
|
||||
'/fake_src/out/Default/base_unittests.runtime_deps':
|
||||
("base_unittests\n"),
|
||||
}
|
||||
self.check(['isolate', '-c', 'debug_goma', '//out/Default',
|
||||
'base_unittests'], files=files, ret=0)
|
||||
self.check([
|
||||
'isolate', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'
|
||||
],
|
||||
files=files,
|
||||
ret=0)
|
||||
|
||||
# test running isolate on an existing build_dir
|
||||
files['/fake_src/out/Default/args.gn'] = 'is_debug = true\n'
|
||||
@ -748,7 +767,7 @@ class UnitTest(unittest.TestCase):
|
||||
mbw.Call = fake_call
|
||||
|
||||
self.check([
|
||||
'gen', '-c', 'debug_goma', '--swarming-targets-file',
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
@ -784,7 +803,7 @@ class UnitTest(unittest.TestCase):
|
||||
mbw.Call = fake_call
|
||||
|
||||
self.check([
|
||||
'gen', '-c', 'debug_goma', '--swarming-targets-file',
|
||||
'gen', '-c', 'debug_remoteexec', '--swarming-targets-file',
|
||||
'/tmp/swarming_targets', '//out/Default'
|
||||
],
|
||||
mbw=mbw,
|
||||
@ -812,8 +831,12 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
# Result of `gn desc runtime_deps`
|
||||
mbw.cmds.append((0, 'base_unitests\n../../test_data/\n', ''))
|
||||
self.check(['isolate', '-c', 'debug_goma', '//out/Default',
|
||||
'base_unittests'], mbw=mbw, ret=0, err='')
|
||||
self.check([
|
||||
'isolate', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0,
|
||||
err='')
|
||||
|
||||
def test_isolate_generated_dir(self):
|
||||
files = {
|
||||
@ -834,8 +857,11 @@ class UnitTest(unittest.TestCase):
|
||||
expected_err = ('error: gn `data` items may not list generated directories;'
|
||||
' list files in directory instead for:\n'
|
||||
'//out/Default/test_data/\n')
|
||||
self.check(['isolate', '-c', 'debug_goma', '//out/Default',
|
||||
'base_unittests'], mbw=mbw, ret=1)
|
||||
self.check([
|
||||
'isolate', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
self.assertEqual(mbw.out[-len(expected_err):], expected_err)
|
||||
|
||||
|
||||
@ -849,8 +875,10 @@ class UnitTest(unittest.TestCase):
|
||||
'/fake_src/out/Default/base_unittests.runtime_deps':
|
||||
("base_unittests\n"),
|
||||
}
|
||||
mbw = self.check(['run', '-c', 'debug_goma', '//out/Default',
|
||||
'base_unittests'], files=files, ret=0)
|
||||
mbw = self.check(
|
||||
['run', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'],
|
||||
files=files,
|
||||
ret=0)
|
||||
# pylint: disable=line-too-long
|
||||
self.assertEqual(
|
||||
mbw.files['/fake_src/out/Default/base_unittests.isolate'],
|
||||
@ -888,16 +916,23 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
mbw.ToSrcRelPath = to_src_rel_path_stub
|
||||
|
||||
self.check(['run', '-s', '-c', 'debug_goma', '//out/Default',
|
||||
'base_unittests'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'run', '-s', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
|
||||
# Specify a custom dimension via '-d'.
|
||||
mbw = self.fake_mbw(files=files)
|
||||
mbw.files[mbw.PathJoin(mbw.TempDir(), 'task.json')] = task_json
|
||||
mbw.files[mbw.PathJoin(mbw.TempDir(), 'collect_output.json')] = collect_json
|
||||
mbw.ToSrcRelPath = to_src_rel_path_stub
|
||||
self.check(['run', '-s', '-c', 'debug_goma', '-d', 'os', 'Win7',
|
||||
'//out/Default', 'base_unittests'], mbw=mbw, ret=0)
|
||||
self.check([
|
||||
'run', '-s', '-c', 'debug_remoteexec', '-d', 'os', 'Win7',
|
||||
'//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=0)
|
||||
|
||||
# Use the internal swarming server via '--internal'.
|
||||
mbw = self.fake_mbw(files=files)
|
||||
@ -905,7 +940,7 @@ class UnitTest(unittest.TestCase):
|
||||
mbw.files[mbw.PathJoin(mbw.TempDir(), 'collect_output.json')] = collect_json
|
||||
mbw.ToSrcRelPath = to_src_rel_path_stub
|
||||
self.check([
|
||||
'run', '-s', '--internal', '-c', 'debug_goma', '//out/Default',
|
||||
'run', '-s', '--internal', '-c', 'debug_remoteexec', '//out/Default',
|
||||
'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
@ -942,27 +977,29 @@ class UnitTest(unittest.TestCase):
|
||||
|
||||
mbw.ToSrcRelPath = to_src_rel_path_stub
|
||||
|
||||
self.check(
|
||||
['run', '-s', '-c', 'debug_goma', '//out/Default', 'base_unittests'],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
self.check([
|
||||
'run', '-s', '-c', 'debug_remoteexec', '//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
mbw = self.fake_mbw(files=files)
|
||||
mbw.files[mbw.PathJoin(mbw.TempDir(), 'task.json')] = task_json
|
||||
mbw.files[mbw.PathJoin(mbw.TempDir(), 'collect_output.json')] = collect_json
|
||||
mbw.ToSrcRelPath = to_src_rel_path_stub
|
||||
self.check([
|
||||
'run', '-s', '-c', 'debug_goma', '-d', 'os', 'Win7', '//out/Default',
|
||||
'base_unittests'
|
||||
'run', '-s', '-c', 'debug_remoteexec', '-d', 'os', 'Win7',
|
||||
'//out/Default', 'base_unittests'
|
||||
],
|
||||
mbw=mbw,
|
||||
ret=1)
|
||||
|
||||
def test_lookup(self):
|
||||
self.check(['lookup', '-c', 'debug_goma'], ret=0,
|
||||
self.check(['lookup', '-c', 'debug_remoteexec'],
|
||||
ret=0,
|
||||
out=('\n'
|
||||
'Writing """\\\n'
|
||||
'is_debug = true\n'
|
||||
'use_goma = true\n'
|
||||
'use_remoteexec = true\n'
|
||||
'""" to _path_/args.gn.\n\n'
|
||||
'/fake_src/buildtools/linux64/gn gen _path_\n'))
|
||||
|
||||
@ -1070,22 +1107,10 @@ class UnitTest(unittest.TestCase):
|
||||
ret=0)
|
||||
|
||||
def test_quiet_lookup(self):
|
||||
self.check(['lookup', '-c', 'debug_goma', '--quiet'], ret=0,
|
||||
out=('is_debug = true\n'
|
||||
'use_goma = true\n'))
|
||||
|
||||
def test_lookup_goma_dir_expansion(self):
|
||||
self.check(['lookup', '-c', 'rel_bot', '-g', '/foo'],
|
||||
self.check(['lookup', '-c', 'debug_remoteexec', '--quiet'],
|
||||
ret=0,
|
||||
out=('\n'
|
||||
'Writing """\\\n'
|
||||
'dcheck_always_on = false\n'
|
||||
'enable_doom_melon = true\n'
|
||||
'goma_dir = "/foo"\n'
|
||||
'is_debug = false\n'
|
||||
'use_goma = true\n'
|
||||
'""" to _path_/args.gn.\n\n'
|
||||
'/fake_src/buildtools/linux64/gn gen _path_\n'))
|
||||
out=('is_debug = true\n'
|
||||
'use_remoteexec = true\n'))
|
||||
|
||||
def test_help(self):
|
||||
orig_stdout = sys.stdout
|
||||
@ -1137,7 +1162,7 @@ class UnitTest(unittest.TestCase):
|
||||
ret=0,
|
||||
out=('dcheck_always_on = false\n'
|
||||
'is_debug = false\n'
|
||||
'use_goma = true\n'))
|
||||
'use_remoteexec = true\n'))
|
||||
|
||||
def test_train(self):
|
||||
mbw = self.fake_mbw()
|
||||
|
@ -150,7 +150,7 @@ class UnitTest(unittest.TestCase):
|
||||
configs = ast.literal_eval(mb_unittest.TEST_CONFIG)
|
||||
all_configs = validation.GetAllConfigs(configs['builder_groups'])
|
||||
self.assertEqual(all_configs['rel_bot'], 'fake_builder_group')
|
||||
self.assertEqual(all_configs['debug_goma'], 'fake_builder_group')
|
||||
self.assertEqual(all_configs['debug_remoteexec'], 'fake_builder_group')
|
||||
|
||||
def test_CheckAllConfigsAndMixinsReferenced_ok(self):
|
||||
configs = ast.literal_eval(mb_unittest.TEST_CONFIG)
|
||||
|
Reference in New Issue
Block a user