mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1304508 - Support passing --keep-going to make; r=chmanchester,ted
mozharness is currently making a manual `make -k` invocation. We don't want automation calling `make` directly. So teach `mach build` to accept a --keep-going argument that results in `make -k`. MozReview-Commit-ID: H3lJ4r8S4vj --HG-- extra : rebase_source : 9feb7bcaeb855254c53c5fa9d49177c5133f2773
This commit is contained in:
parent
3712aeca37
commit
61a5501145
@ -451,7 +451,7 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
srcdir=False, allow_parallel=True, line_handler=None,
|
||||
append_env=None, explicit_env=None, ignore_errors=False,
|
||||
ensure_exit_code=0, silent=True, print_directory=True,
|
||||
pass_thru=False, num_jobs=0):
|
||||
pass_thru=False, num_jobs=0, keep_going=False):
|
||||
"""Invoke make.
|
||||
|
||||
directory -- Relative directory to look for Makefile in.
|
||||
@ -513,6 +513,9 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
if print_directory:
|
||||
args.append('-w')
|
||||
|
||||
if keep_going:
|
||||
args.append('-k')
|
||||
|
||||
if isinstance(target, list):
|
||||
args.extend(target)
|
||||
elif target:
|
||||
|
@ -297,8 +297,10 @@ class Build(MachCommandBase):
|
||||
help='Do not add extra make dependencies.')
|
||||
@CommandArgument('-v', '--verbose', action='store_true',
|
||||
help='Verbose output for what commands the build is running.')
|
||||
@CommandArgument('--keep-going', action='store_true',
|
||||
help='Keep building after an error has occurred')
|
||||
def build(self, what=None, disable_extra_make_dependencies=None, jobs=0,
|
||||
directory=None, verbose=False):
|
||||
directory=None, verbose=False, keep_going=False):
|
||||
"""Build the source tree.
|
||||
|
||||
With no arguments, this will perform a full build.
|
||||
@ -412,7 +414,7 @@ class Build(MachCommandBase):
|
||||
# comprehensive history lesson.
|
||||
self._run_make(directory=self.topobjdir, target='backend',
|
||||
line_handler=output.on_line, log=False,
|
||||
print_directory=False)
|
||||
print_directory=False, keep_going=keep_going)
|
||||
|
||||
# Build target pairs.
|
||||
for make_dir, make_target in target_pairs:
|
||||
@ -423,7 +425,8 @@ class Build(MachCommandBase):
|
||||
status = self._run_make(directory=make_dir, target=make_target,
|
||||
line_handler=output.on_line, log=False, print_directory=False,
|
||||
ensure_exit_code=False, num_jobs=jobs, silent=not verbose,
|
||||
append_env={b'NO_BUILDSTATUS_MESSAGES': b'1'})
|
||||
append_env={b'NO_BUILDSTATUS_MESSAGES': b'1'},
|
||||
keep_going=keep_going)
|
||||
|
||||
if status != 0:
|
||||
break
|
||||
@ -461,7 +464,7 @@ class Build(MachCommandBase):
|
||||
status = self._run_make(srcdir=True, filename='client.mk',
|
||||
line_handler=output.on_line, log=False, print_directory=False,
|
||||
allow_parallel=False, ensure_exit_code=False, num_jobs=jobs,
|
||||
silent=not verbose)
|
||||
silent=not verbose, keep_going=keep_going)
|
||||
|
||||
self.log(logging.WARNING, 'warning_summary',
|
||||
{'count': len(monitor.warnings_database)},
|
||||
|
Loading…
Reference in New Issue
Block a user