This command takes a list of test ids and returns the list of test
files that correspond to those test ids. The mapping is one-to-many
between files and test ids i.e. a single file can generate many tests.
Differential Revision: https://phabricator.services.mozilla.com/D56192
--HG--
extra : moz-landing-system : lando
Changes:
Remove `environment` from the python3 blacklist.
Remove the option to specify `configure` for the formatting argument, since it has never been supported (the method has never been implemented).
Differential Revision: https://phabricator.services.mozilla.com/D54395
--HG--
extra : moz-landing-system : lando
This allows running the jit_test.py harness using mach. It works very
similarly to the existing 'mach jstests' command.
Differential Revision: https://phabricator.services.mozilla.com/D51518
--HG--
extra : moz-landing-system : lando
Changes:
- remove `uuid` from the python3 blacklist in `mach`
- enable `test_telemetry.py` for python3
- adjust test outcome expectation for Windows + python3, suspect `mozpack.path` is not filtering Windows path correctly in python3 environment
- switch file read mode between `r` and `rb` depending on version of python
Differential Revision: https://phabricator.services.mozilla.com/D45903
--HG--
extra : moz-landing-system : lando
Some commands use external argument parsers, so invoking |mach help <command>| will import
external modules (which may only be Python 2 compatible).
This makes sure that we detect the actual subcommand we're generating help for
and use the proper Python.
A much simpler solution would have been to run |mach help| with Python 2 all
the time. However, as we convert things to Python 3 this would have meant that
Python 3 only code would blow up. This would have forced us to continue
supporting Python 2, even for Python 3-only commands.
Differential Revision: https://phabricator.services.mozilla.com/D43989
--HG--
extra : moz-landing-system : lando
Changes:
- remove binary encoding when the subdirectories are being collected
- do not open file in binary mode when reading from `telemetry_client_id.json`
Differential Revision: https://phabricator.services.mozilla.com/D44057
--HG--
extra : moz-landing-system : lando
This includes the following commands:
* dxr
* google
* mdn
* search
* searchfox
Differential Revision: https://phabricator.services.mozilla.com/D36843
--HG--
extra : moz-landing-system : lando
Credit: mars for making the shell POSIX compliant
This embeds a blacklist of every mach command that needs to run with Python 2
directly in the mach driver itself. Initially this is every mach command. We
then use a bit of shell to determine whether the command being run needs Python
2 or 3.
While this approach may seem a bit hacky, it has several benefits:
1. No need to add complex machinery in mach's registration code.
2. No need to spawn two separate Python interpreters in the event a different
Python from the original interpreter is needed.
3. Perf impact is negligible.
4. New commands are Python 3 by default.
It is also only a temporary hack. Once all commands are running with Python 3,
we can revert back to the original mach driver.
Differential Revision: https://phabricator.services.mozilla.com/D36103
--HG--
extra : moz-landing-system : lando
This generalizes the monkey-patching of the main module added
in bug 914563 to allow multiprocessing to be used from config.status
(which triggers the same bug as when it's used with `mach` as main).
MozReview-Commit-ID: AdOdpKzmbsp
The mach binary needs to find a srcdir (or test zip) to operator on. As a last resort,
it checks the directory containing the binary itself. If the binary has been symlinked
to say, $HOME/bin, it won't follow the symlink to the proper location, and the check
will fail.
Fixing this means developers can run `mach` from outside of the srcdir, as the symlink
will be followed to the actual srcdir. The motivation for this is actually to improve
the UX of debugging failures on interactive workers. With this fix, we can provide
developers with a mach environment directly from $HOME without them needing to go
find it.
MozReview-Commit-ID: ZEH8MuyKv
--HG--
extra : rebase_source : 2b5adbad1b5261f2268f6a30e7dd884d7820da5e
Currently the mach binary will look for 'mozinfo.json' and if it finds it assume
we are in an objdir. But now, 'mozinfo.json' can also be found in an extracted
tests.zip (depending which zips were used). This trips up the tests.zip mach
environment and causes some problems.
This works around the issue by looking for both 'mozinfo.json' and 'config.status'
MozReview-Commit-ID: BIXcCm4LzE2
--HG--
extra : rebase_source : 6e2dc0502de1cddec8eccdfe30524864be81536c
When writing bytecode, Python will append "c" to the loaded filename to
produce a bytecode file. Since "mach" was being imported, this resulted
in the creation of a "machc" file.
The implementation of imp.load_module() in CPython's import.c checks
sys.dont_write_bytecode. So, we wrap imp.load_module to set this flag
when importing mach.
--HG--
extra : rebase_source : 248a2349663affee3920a0726e10818d57c6ff17
extra : amend_source : 221280da9963cf91975658144ff3011353852fee
OpenBSD doesn't have "python" on $PATH by default. "python" may also
come from a non-2.7 Python. Switching the shebang will help ensure the
user invokes mach with Python 2.7.
OpenBSD doesn't have "python" on $PATH by default. "python" may also
come from a non-2.7 Python. Switching the shebang will help ensure the
user invokes mach with Python 2.7.
There is a risk this may break mach for some people. If the masses
complain, we may roll back.
--HG--
extra : rebase_source : e05b707779bc80e9f9c9f30ba8cd70aa6aa9847f
extra : amend_source : 418ecc9e4c289e7dd8c4423e701ebc9574ecae45
When Gecko is reentered from unsafe call sites, we allow the reentry, but we
suppress execution of the refresh driver to minimize the danger.
In this patch, we treat all sites as unsafe.
--HG--
rename : toolkit/modules/Timer.jsm => browser/devtools/shared/Browser.jsm
rename : toolkit/modules/tests/xpcshell/test_timer.js => browser/devtools/shared/test/browser_browser_basic.js
rename : build/mach_bootstrap.py => mach
extra : rebase_source : b83c1d09313bff62357eaa931eced0f72f838493
This is the beginning of Mozilla's new build system.
In this patch, we have a Python sandbox tailored for execution
of Python scripts which will define the build system. We also have a
build reader that traverses a linked set of scripts.
More details are available in the thorough README.rst files as part of
this patch.
* * *
Bug 784841 - Part 2b: Option to not descend into child moz.build files; r=ted
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
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