We now return the status code from executed processes. The API to
require a successful status code has been changed from ignore_errors to
ensure_exit_code. The build mach command no longer spews a stack trace
if make fails.
DONTBUILD (NPOTB)
All mach modules are now explicitly listed in the mach driver.
--HG--
rename : python/mozbuild/mach/commands/build.py => python/mozbuild/mozbuild/mach_commands.py
Previously we were tighly coupled with MozbuildObject. This was not in
the spirit of mach being a generic tool. Now, instead of passing multiple
arguments to __init__ of the class providing the mach command we either
pass 0 or 1. The number of arguments is detected when processing the
@CommandProvider decorator. The optional argument is a named tuple
containing mach run-time state.
Capturing of mach command provider information is now captured in a
class (as opposed to an anoymous tuple). We also capture these in a rich
data structure which is passed as part of the run-time data to the
command provider class. This allows mach commands to inspect the mach
environment.
Mach decorators have been moved to mach.decorators. mach.base is
reserved for generic mach data/container classes.
Existing mach command classes derived from MozbuildObject have been
replaced with either object or mozbuild.base.MachCommandBase. This
latter class translates the mach context instance passed to __init__
into the constructor arguments for MozbuildObject.__init__.
Support for registering function handlers with mach has been removed.
All handlers must be inside classes.
--HG--
rename : python/mach/mach/base.py => python/mach/mach/decorators.py
The command was practically worthless and will likely be reborn as a
generic "run a test by specific a path or special name" command. But,
that requires a more intelligent build system first.
The code interacting with the test runners now resides in closer
proximity to the code it is invoking. We also purge testing
functionality from mozbuild, which is where it never really belonged.
--HG--
rename : python/mozbuild/mozbuild/testing/reftest.py => layout/tools/reftest/mach_commands.py
rename : python/mozbuild/mozbuild/testing/mochitest.py => testing/mochitest/mach_commands.py
rename : python/mozbuild/mozbuild/testing/xpcshell.py => testing/xpcshell/mach_commands.py
This patch on its own will break mach. Part 3 will refactor mach's
loader to discover and load modules using a modified module finding
method.
--HG--
rename : python/mach/mach/settings.py => python/mach/mach/commands/settings.py
rename : python/mach/mach/build.py => python/mozbuild/mach/commands/build.py
rename : python/mach/mach/testing.py => python/mozbuild/mach/commands/testing.py
rename : python/mach/mach/warnings.py => python/mozbuild/mach/commands/warnings.py
This makes existing mozbuild code compatible with Python 2.7 and Python
3.2. Future additions to this package will be compatible with both
Python versions.