This uses the `email` module to parse the .patch file that Github generates,
so that it properly decodes encoded-words in the headers. Also using this
module is better with python3, so this patch also takes the command off the
python2 whitelist and makes it python3-compatible.
Differential Revision: https://phabricator.services.mozilla.com/D66621
--HG--
extra : moz-landing-system : lando
This fixes all of the jit-test problems I encountered, and fixes all but the wpt portion of jstests. This is unnecessary, but it also ports jstests from optparse to argparse (because optparse is deprecated, because I like argparse better, and because it happened to fix the minor compatibility issue I ran into even though it has a trivial fix on its own.)
Differential Revision: https://phabricator.services.mozilla.com/D65047
--HG--
extra : moz-landing-system : lando
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