Граф коммитов

131 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey e469210428 Bug 1669874 - Use `command -v` instead of `which` in mach. r=firefox-build-system-reviewers,andi,rstewart
The former is a POSIX shell construct, usually a builtin, and the latter
is an external program that is not guaranteed to be available.

When `which` is not available, a full ./mach build succeeds with this
change.

Differential Revision: https://phabricator.services.mozilla.com/D92864
2020-10-08 14:58:43 +00:00
Geoff Brown 7d74529955 Bug 1638974 - Run 'mach mochitest' with Python 3; r=bc
Minor fix to remoteautomation.py: Increment stdoutlen before any type conversions,
to ensure that it accurately reflects the byte offset in the file.

With this last change, 'mach mochitest' appears to run correctly on Android with Python 3:
switch it over to Python 3.

Differential Revision: https://phabricator.services.mozilla.com/D91586
2020-09-28 16:30:33 +00:00
Mitchell Hentges 1de0840710 Bug 1665445: install-moz-phab installs the Phabricator credentials r=firefox-build-system-reviewers,rstewart
Since `install-moz-phab` is meant to simplify the moz-phab setup flow,
automatically prompting for Phabricator credentials removes an otherwise
manual step.

Detecting the "console_script" location of a package in a
cross-platform, virtualenv-supporting and "--user"-supporting way is
tough, and the most consistent solution seems to be to list the package
contents of moz-phab and look for the one that seems to be the entry
point.

Differential Revision: https://phabricator.services.mozilla.com/D90642
2020-09-22 20:44:32 +00:00
Steve Fink 038a3a2fc2 Bug 1638966 - Run `mach hazards` under py3 r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D90483
2020-09-17 19:57:18 +00:00
Ricky Stewart 1a65ffc115 Bug 1662787 - Provide an environment variable to force running `mach python-test` command with Python 2 r=froydnj,firefox-build-system-reviewers,mhentges
This is only useful for `mach` commands that we want to run with Python 3 by default, but for which running with Python 2 is still useful. We now have one such command: `python-test`.

In `mach`, switch on the presence of the `MACH_PY2` environment variable. We only want to allow this for `python-test`, so do that sanity check in `mach` as well.

Differential Revision: https://phabricator.services.mozilla.com/D89162
2020-09-02 16:21:42 +00:00
Ricky Stewart bbfa258584 Bug 1656993: Create and require by default global `virtualenv`s in `~/.mozbuild` for `mach` r=mhentges,ahal
In two different places we've been encountering issues regarding 1) how we configure the system Python environment and 2) how the system Python environment relates to the `virtualenv`s that we use for building, testing, and other dev tasks. Specifically:

1. With the push to use `glean` for telemetry in `mach`, we are requiring (or rather, strongly encouraging) the `glean_sdk` Python package to be installed with bug 1651424. `mach bootstrap` upgrades the library using your system Python 3 in bug 1654607. We can't vendor it due to the package containing native code. Since we generally vendor all code required for `mach` to function, requiring that the system Python be configured with a certain version of `glean` is an unfortunate change.

2. The build uses the vendored `glean_parser` for a number of build tasks. Since the vendored `glean_parser` conflicts with the globally-installed `glean_sdk` package, we had to add special ad-hoc handling to allow us to circumvent this conflict in bug 1655781.

3. We begin to rely more and more on the `zstandard` package during build tasks, this package again being one that we can't vendor due to containing native code. Bug 1654994 contained more ad-hoc code which subprocesses out from the build system's `virtualenv` to the SYSTEM `python3` binary, assuming that the system `python3` has `zstandard` installed.

As we rely more on `glean_sdk`, `zstandard`, and other packages that are not vendorable, we need to settle on a standard model for how `mach`, the build process, and other `mach` commands that may make their own `virtualenv`s work in the presence of unvendorable packages.

With that in mind, this patch does all the following:

1. Separate out the `mach` `virtualenv_packages` from the in-build `virtualenv_packages`. Refactor the common stuff into `common_virtualenv_packages.txt`. Add functionality to the `virtualenv_packages` manifest parsing to allow the build `virtualenv` to "inherit" from the parent by pointing to the parent's `site-packages`. The `in-virtualenv` feature from bug 1655781 is no longer necessary, so delete it.

2. Add code to `bootstrap`, as well as a new `mach` command `create-mach-environment` to create `virtualenv`s in `~/.mozbuild`.

3. Add code to `mach` to dispatch either to the in-`~/.mozbuild` `virtualenv`s (or to the system Python 3 for commands which cannot run in the `virtualenv`s, namely `bootstrap` and `create-mach-environment`).

4. Remove the "add global argument" feature from `mach`. It isn't used and conflicts with (3).

5. Remove the `--print-command` feature from `mach` which is obsoleted by these changes.

This has the effect of allowing us to install packages that cannot be vendored into a "common" place (namely the global `~/.mozbuild` `virtualenv`s) and use those from the build without requiring us to hit the network. Miscellaneous implementation notes:

1. We allow users to force running `mach` with the system Python if they like. For now it doesn't make any sense to require 100% of people to create these `virtualenv`s when they're allowed to continue on with the old behavior if they like. We also skip this in CI.

2. We needed to duplicate the global-argument logic into the `mach` script to allow for the dispatch behavior. This is something we avoided with the Python 2 -> Python 3 migration with the `--print-command` feature, justifying its use by saying it was only temporarily required until all `mach` commands were running with Python 3. With this change, we'll need to be able to determine the `mach` command from the shell script for the forseeable future, and committing to this forever with the cost that `--print-command` incurs (namely `mach` startup time, an additional .4s on my machine) didn't seem worth it to me. It's not a ton of duplicated code.

Differential Revision: https://phabricator.services.mozilla.com/D85916
2020-08-17 17:21:02 +00:00
Hamzah b7e6b41fc5 Bug 1594914 - Convert mach python-test to run with python 3 r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D77872
2020-08-04 17:40:58 +00:00
Tom Prince 1501888375 Bug 1638990: [taskgraph] Run `mach taskgraph` with python 3; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D84087
2020-07-23 03:48:56 +00:00
Geoff Brown 8731a1e19e Bug 1638963 - Run 'mach geckoview-junit' with py3; r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D84560
2020-07-22 18:08:02 +00:00
Hamzah 570e9a50fc Bug 1606475 - Move mach clang-format to Python 3 r=andi
Manually tested various combination of commands for `./mach clang-format`. It works fine on both py2 as well as py3

Differential Revision: https://phabricator.services.mozilla.com/D79330
2020-07-20 12:12:28 +00:00
Tom Prince 7524e40b38 Bug 1653662: [mozrelease] Update mozrelease subcommands to python 3; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D84042
2020-07-18 01:36:36 +00:00
Edgar Chen 122e54cf20 Bug 1638999 - Convert 'mach webidl-parser-test' to run with Python 3; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83416
2020-07-15 20:28:16 +00:00
Edgar Chen c2f8b06f06 Bug 1638998 - Convert 'mach webidl-example' to run with Python 3; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D83409
2020-07-15 20:28:03 +00:00
Hamzah 6802583a06 Bug 1639009 - Convert 'mach xpcshell-test' to run with Python 3 r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D78522
2020-07-09 16:49:48 +00:00
Mihai Alexandru Michis 53a4dbf91a Backed out changeset 19269e470c71 (bug 1594914) for causing bustages.
CLOSED TREE
2020-07-09 01:36:29 +03:00
Hamzah 0606c70920 Bug 1594914 - Convert mach python-test to run with python 3 r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D77872
2020-07-08 19:15:27 +00:00
Geoff Brown d72a37cce9 Bug 1638984 - Run 'mach rusttests' in python 3; r=firefox-build-system-reviewers,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D81769
2020-06-30 21:48:51 +00:00
egao b78617c46d Bug 1638950 - run mach browsertime with python3 r=sparky
Changes:
  - `mach browsertime` appears to run well on python3 without any changes.

Differential Revision: https://phabricator.services.mozilla.com/D81383
2020-06-29 17:56:58 +00:00
Edwin Takahashi c2f58a5a8d Bug 1638964 - run mach gradle with python3 r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D80286
2020-06-22 16:22:07 +00:00
Andi-Bogdan Postelnicu cda84762fb Bug 1638985 - Convert 'mach static-analysis' to run with Python 3. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D79306
2020-06-11 15:54:29 +00:00
Mitchell Hentges 0bc6909185 Bug 1621960: Change |mach python| default from Python 2 to Python 3 r=rstewart
Depends on D77967

Differential Revision: https://phabricator.services.mozilla.com/D78181
2020-06-10 16:10:08 +00:00
Noemi Erli 9017f973e3 Backed out 4 changesets (bug 1621960) for causing Android bustages CLOSED TREE
Backed out changeset f36a95234a5f (bug 1621960)
Backed out changeset 0e4661c9061d (bug 1621960)
Backed out changeset 3e2cbe4dd777 (bug 1621960)
Backed out changeset d7eb101e5df7 (bug 1621960)
2020-06-09 20:59:26 +03:00
Mitchell Hentges 4006a0890c Bug 1621960: Change |mach python| default from Python 2 to Python 3 r=rstewart
Depends on D77967

Differential Revision: https://phabricator.services.mozilla.com/D78181
2020-06-09 16:44:51 +00:00
Edwin Takahashi 009907a024 Bug 1642545 - run mach taskcluster-build-image with python 3 r=gbrown
Changes:

No changes were required to run taskcluster-build-image with python3.5.

Differential Revision: https://phabricator.services.mozilla.com/D77755
2020-06-02 14:13:43 +00:00
Edwin Takahashi 8f613ab93f Bug 1638975 - run mach pastebin with python3 r=bc
Changes:

`mach pastebin` ran fine with Python3 without any changes.

Differential Revision: https://phabricator.services.mozilla.com/D77713
2020-06-02 14:08:48 +00:00
Bob Clary ece3db1d73 Bug 1638956 - mark mach crashtest as Python 2 only again. r=gbrown
Depends on D77522

Differential Revision: https://phabricator.services.mozilla.com/D77523
2020-05-29 19:47:30 +00:00
Bob Clary f3790362ef Bug 1638973 - mark mach marionette-test as Python 2 only again. r=gbrown
Depends on D77521

Differential Revision: https://phabricator.services.mozilla.com/D77522
2020-05-29 19:49:12 +00:00
Bob Clary fb36016d6d Bug 1638972 - mark mach jstestbrowser, mach jstests as Python 2 only again. r=gbrown
Depends on D77514

Differential Revision: https://phabricator.services.mozilla.com/D77521
2020-05-29 19:47:48 +00:00
Bob Clary 90f63d038b Bug 1641742 - mark mach reftest as Python 2 only again, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D77514
2020-05-29 19:40:07 +00:00
James Graham 9c097cff23 Bug 1638978 - Convert mach puppeteer-test to Python 3, r=remote-protocol-reviewers,maja_zf
Differential Revision: https://phabricator.services.mozilla.com/D77443
2020-05-29 12:37:45 +00:00
Geoff Brown da55c8ff29 Bug 1638954 - Run 'mach cppunittest' with python 3; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D77258
2020-05-28 14:45:50 +00:00
Geoff Brown 21053c0624 Bug 1638965 - Run 'mach gtest' in python 3; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D77092
2020-05-27 20:53:22 +00:00
Bob Clary 4ae8d3eb0e Bug 1638956 - enable mach crashtest to run with Python 3. r=gbrown
Depends on D76651

Differential Revision: https://phabricator.services.mozilla.com/D76866
2020-05-26 19:38:47 +00:00
Bob Clary 41921fd954 Bug 1638973 - enable mach marionette-test to run with Python 3. r=marionette-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D76651
2020-05-26 15:54:07 +00:00
Bob Clary 6a0aed7b99 Bug 1638981 - enable mach reftests to run with Python 3. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D76650
2020-05-27 13:07:07 +00:00
Bob Clary ba6fe87dce Bug 1638972 - enable mach jstests to run with Python 3. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D76649
2020-05-26 15:53:52 +00:00
Nicholas Nethercote 61f2f5aef8 Bug 1638976 - Convert 'mach power' to run with Python 3. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D76273
2020-05-25 23:50:19 +00:00
Geoff Brown e8724ccfdc Bug 1638993 - Run 'mach test-info' with python 3; r=jmaher
With recent changes to dependencies, 'mach test-info' can now run under python 3.

Differential Revision: https://phabricator.services.mozilla.com/D76607
2020-05-23 20:54:00 +00:00
Dan Minor fdcf957cca Bug 1634675 - Remove webrtc-gtests r=drno,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73451
2020-05-20 19:59:45 +00:00
Ricky Stewart 1a44b2a1d9 Bug 1638983 - Run `mach repackage` with Python 3 r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D76058
2020-05-20 15:35:58 +00:00
Ricky Stewart a24b65434d Bug 1638995 - Run `mach valgrind-test` with Python 3 r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D76057
2020-05-20 05:31:58 +00:00
Henrik Skupin fddeddcf31 Bug 1638982 - [remote] Convert 'mach remote' to run with Python 3 r=rstewart,remote-protocol-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D75901
2020-05-20 04:35:34 +00:00
Ricky Stewart ae0b4a1716 Bug 1638967 - Run `mach ide` in Python 3 r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D76029
2020-05-19 21:32:59 +00:00
Ricky Stewart aefac46494 Bug 1638951 - Run `mach cargo` with Python 3 r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D75999
2020-05-19 19:35:52 +00:00
Geoff Brown efe0d0c5bd Bug 1638948 - Run 'mach android-emulator' with python 3; r=bc
This command is already python 3 compatible, thanks to m_kato's previous efforts.

Differential Revision: https://phabricator.services.mozilla.com/D75997
2020-05-19 16:54:37 +00:00
Simon Fraser 434afc08e6 Bug 1639151 Convert |mach release-history| and nightly history population to py3 r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D75919
2020-05-19 15:19:38 +00:00
Ricky Stewart 69ecad92c6 Bug 1579329 - Run `mach file-info` with Python 3 r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D75343
2020-05-14 18:20:22 +00:00
Ricky Stewart fd2e8753b6 Bug 1637778 - Delete `mach robocop` from py2 mach command list r=nalexander
This isn't an actual `mach` command (it was deleted and replaced by `mochitest`).

Differential Revision: https://phabricator.services.mozilla.com/D75210
2020-05-14 04:40:20 +00:00
Mitchell Hentges b8108d6064 Bug 1632429: Migrate |./mach try| to python 3; r=rstewart,ahal
|./mach try| subcommands are now compatible with both python 2 and 3.

Hand-tested with many combinations of subcommand and subcommand flags.

Updates tryselect unit tests to use Python 3.

Differential Revision: https://phabricator.services.mozilla.com/D73398
2020-05-06 22:17:14 +00:00
Ricky Stewart 8ffbec29d9 Bug 1635491 - Delete tup backend and `mach analyze` r=froydnj
It's not maintained and doesn't work as-is. If we want to revive it we can grab it from source control later, but in the meantime it's just confusing and it comes up in search results even though we never look for it.

Also delete `mach analyze` which depends on the existence of a Tup backend.

Differential Revision: https://phabricator.services.mozilla.com/D73911
2020-05-05 17:28:07 +00:00