Commit 06576294 authored by Max Moroz's avatar Max Moroz Committed by Commit Bot

Coverage script: use autoninja instead of ninja and custom goma checker.

TEST=tools/code_coverage/coverage_test.py

Bug: 869451
Change-Id: I29423a45d6542e358e7157bc6af7f9208969a436
Reviewed-on: https://chromium-review.googlesource.com/c/1394594
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#619714}
parent 789557f2
......@@ -111,9 +111,6 @@ BUILD_DIR = None
# line arguemnts.
OUTPUT_DIR = None
# Default number of jobs used to build when goma is configured and enabled.
DEFAULT_GOMA_JOBS = 100
# Name of the file extension for profraw data files.
PROFRAW_FILE_EXTENSION = 'profraw'
......@@ -287,21 +284,9 @@ def _BuildTargets(targets, jobs_count):
jobs_count: Number of jobs to run in parallel for compilation. If None, a
default value is derived based on CPUs availability.
"""
def _IsGomaConfigured():
"""Returns True if goma is enabled in the gn build args.
Returns:
A boolean indicates whether goma is configured for building or not.
"""
build_args = _GetBuildArgs()
return 'use_goma' in build_args and build_args['use_goma'] == 'true'
logging.info('Building %s.', str(targets))
if jobs_count is None and _IsGomaConfigured():
jobs_count = DEFAULT_GOMA_JOBS
subprocess_cmd = ['ninja', '-C', BUILD_DIR]
subprocess_cmd = ['autoninja', '-C', BUILD_DIR]
if jobs_count is not None:
subprocess_cmd.append('-j' + str(jobs_count))
......@@ -909,8 +894,8 @@ def _ParseCommandArguments():
type=int,
default=None,
help='Run N jobs to build in parallel. If not specified, a default value '
'will be derived based on CPUs availability. Please refer to '
'\'ninja -h\' for more details.')
'will be derived based on CPUs and goma availability. Please refer to '
'\'autoninja -h\' for more details.')
arg_parser.add_argument(
'-v',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment