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

184 Коммитов

Автор SHA1 Сообщение Дата
Mitchell Hentges 899e45da09 Bug 1733684 - Resolve mozbuild test compatibility with Py 3.9.5 r=ahal
There were two failures:
* One caused by `subprocess.Popen(...)` no longer liking having an
  `env={}` argument. I couldn't find this documented in the API docs or
  fixed in a future `3.9.x` release, but it's workaround-able by not
  setting the redundant parameter.
* One caused by unexpected characters appearing in a symlink test.
  However, since we shouldn't be leaning on symlinks on Windows, we skip
  the test accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D128624
2021-10-15 19:39:57 +00:00
Michelle Goossens c5f7378922 Bug 1735396 - Update test_archive.py expected file hashes when running on Python 3.9 or newer r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D128294
2021-10-13 00:00:29 +00:00
Joel Maher e9e45c840b Bug 1733705 - mozbuild test migrate from r7 -> r8. r=releng-reviewers,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D127331
2021-10-01 22:19:57 +00:00
Itiel 05d88b715b Bug 1692301 - Add dark mode support for about:buildconfig r=mconley,glandium
Also make it so it'd match the style of other about: pages.

Differential Revision: https://phabricator.services.mozilla.com/D104877
2021-02-18 22:05:09 +00:00
Mike Hommey e7bd434ff1 Bug 1675384 - Resurrect mac unification code. r=firefox-build-system-reviewers,mhentges
This adds back part of the code that was removed in bug 1339182,
reformats it with black, adjusts it to make flake8 happy, and converts
it to python 3.

This also adjusts the script after bug 1534003, which changed the
about:buildconfig page title.

Differential Revision: https://phabricator.services.mozilla.com/D95977
2020-11-06 08:58:08 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Ricky Stewart 59ed932290 Bug 1662856 - Delete `MercurialNativeRevisionFinder` and associated test r=dmajor
Bug 1659539 caused the unit tests of this class to suddenly start running on Linux; it failed with a type error that suggests this test has never really properly worked, at least not with the version of Mercurial we're using in CI (`unsupported changeid '0' of type <type 'unicode'>`). The class itself isn't used anywhere besides these tests, so just delete the entire class.

Differential Revision: https://phabricator.services.mozilla.com/D89205
2020-09-02 21:00:23 +00:00
Coroiu Cristina 828f2319c0 Backed out changeset 2439a32e1a06 (bug 1654961) for mbu failures 2020-07-24 08:19:33 +03:00
Mike Hommey 29e887fea7 Bug 1654961 - Re-enable some python tests on py2 on mac. r=dmajor
Bug 1648506 disabled tests that failed on py2 on mac. They now pass
properly, presumably from more recent changes to
build/moz.configure/init.configure.

Differential Revision: https://phabricator.services.mozilla.com/D84776
2020-07-24 04:19:51 +00:00
Geoff Brown 6612d6856b Bug 1648506 - Disable some python tests on py2 on mac; r=mhentges
These tests fail on py2 on osx when 'mach python-test' runs with python 3, blocking
bug 1594914.

Differential Revision: https://phabricator.services.mozilla.com/D81247
2020-06-25 23:47:38 +00:00
Ricky Stewart e2fe57521b Bug 1638060 - Standardize interface of `mozfile` classes as `bytes`-based streams r=glandium
At the beginning of the Python 3 migration (circa bug 1602540), we made an update to the interface of `mozpack/files.py` in the direction of aligning with Python 3's built-in `file` support; namely, that opening a file in text mode returns a stream of `str` (text), and that opening a file in binary mode returns a stream of `bytes`. This was deemed to be more trouble than it was worth. This patch undoes all of those changes to the interface in favor of moving back to the Python 2 style, where all files are bytestreams.

Differential Revision: https://phabricator.services.mozilla.com/D75424
2020-05-22 01:11:29 +00:00
Mike Hommey 0fb4a38faf Bug 1621436 - Run process_install_manifest with python3. r=rstewart
Differential Revision: https://phabricator.services.mozilla.com/D70156

--HG--
extra : moz-landing-system : lando
2020-04-09 00:21:12 +00:00
Mike Hommey 6fdc4fe0c3 Bug 1618775 - Uniformize preprocessor-inserted paths between platforms. r=froydnj
The preprocessor adds line markers in preprocessed files with line
numbers and file they came from. Bug 1528892 changed those markers
to be independent of the topobjdir and topsrcdir, by replacing them
with $OBJDIR and $SRCDIR, respectively.

This goes further, making these paths always use forward-slash, and
never backwards-slash, making the preprocessed files identical whether
the build occurred on Windows or Unix. (well, except when building
for different targets for target-specific sections)

Differential Revision: https://phabricator.services.mozilla.com/D64714

--HG--
extra : moz-landing-system : lando
2020-02-28 12:31:49 +00:00
Edwin Takahashi 691d57b5ad Bug 1581016 - mozpack/copier.py and mozpack/test_copier.py supports python3 r=glandium,rstewart
Change import order.

Enable python3 testing for `test_copier.py`.

In the test methods, ensure the returned file names are decoded as UTF-8 by default.

In the test methods, check for byte-string by default; in python2, this would be treated like the standard string.

Differential Revision: https://phabricator.services.mozilla.com/D55187

--HG--
extra : moz-landing-system : lando
2019-12-19 22:00:39 +00:00
Ricky Stewart 27fa46c7df Bug 1604337 - mozpack/packager/* files support python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57386

--HG--
extra : moz-landing-system : lando
2019-12-18 23:35:54 +00:00
Ricky Stewart 4bb9805afe Bug 1604277 - mozpack/errors.py and mozpack/manifests.py support python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57362

--HG--
extra : moz-landing-system : lando
2019-12-18 22:06:35 +00:00
Ricky Stewart 7c927ba04b Bug 1602540 - mozpack/files.py and test_files.py support Python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57004

--HG--
extra : moz-landing-system : lando
2019-12-18 23:23:12 +00:00
Bogdan Tara 9351449802 Backed out 3 changesets (bug 1604337, bug 1602540, bug 1604277) for build-linux64-artifact/opt (AB) bustages CLOSED TREE
Backed out changeset 4ac19b94051e (bug 1604337)
Backed out changeset 93e2ef0d77b3 (bug 1604277)
Backed out changeset 4ac9cc8c39b1 (bug 1602540)
2019-12-19 00:02:39 +02:00
Ricky Stewart 6131b0e7ab Bug 1604337 - mozpack/packager/* files support python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57386

--HG--
extra : moz-landing-system : lando
2019-12-18 16:43:09 +00:00
Ricky Stewart c8aa318a85 Bug 1604277 - mozpack/errors.py and mozpack/manifests.py support python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57362

--HG--
extra : moz-landing-system : lando
2019-12-18 16:43:09 +00:00
Ricky Stewart 3e58392872 Bug 1602540 - mozpack/files.py and test_files.py support Python3 r=mars
Differential Revision: https://phabricator.services.mozilla.com/D57004

--HG--
extra : moz-landing-system : lando
2019-12-18 21:15:48 +00:00
Masatoshi Kimura 7276b36871 Bug 1590693 - Unship empty chrome.manifest files. r=glandium
Bug 1295542 added empty chrome.manifest files to prevent malware from abusing
them. This workaround is no longer necessary because Firefox stopped reading
chrome.manifest outside omni.ja since bug 1543761.

Differential Revision: https://phabricator.services.mozilla.com/D55954

--HG--
extra : moz-landing-system : lando
2019-12-12 11:13:42 +00:00
Ricky Stewart 2a74ae61fc Bug 1602525 - mozpack/archive.py and mozpack/test_archive.py support python3 r=firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D56419

--HG--
extra : moz-landing-system : lando
2019-12-09 22:09:54 +00:00
Edwin Takahashi 98a12cfd37 Bug 1589206 - enable test_archive.py for python 2 in mozbuild suite and annotate expected failures r=firefox-build-system-reviewers,mshal
Changes:
- remove the `unicode_literals` import from `test_archive.py` as it was causing failures when dealing with file paths
- mark failing tests with `xfail` annotations, to be investigated at a later date

Differential Revision: https://phabricator.services.mozilla.com/D49498

--HG--
extra : moz-landing-system : lando
2019-10-24 21:38:20 +00:00
Mike Hommey 20f01277a6 Bug 1575375 - Pull mozbuild tests out of make check. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D42759

--HG--
extra : moz-landing-system : lando
2019-08-21 05:00:50 +00:00
Justin Wood 6ae6eb968f Bug 1547730 - Set python test annotations to correspond to currently-passing py3 tests r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28122

--HG--
rename : python/mozbuild/mozbuild/test/python.ini => python/mozbuild/mozbuild/test/python2.ini
rename : python/mozbuild/mozpack/test/python.ini => python/mozbuild/mozpack/test/python2.ini
extra : moz-landing-system : lando
2019-05-28 14:28:53 +00:00
Justin Wood 7aaa02236d Bug 1547730 - Finish up some final py3-izing in getting mozjar.py to work in py3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28120

--HG--
extra : moz-landing-system : lando
2019-05-28 14:28:45 +00:00
Justin Wood 5045a4b86c Bug 1547730 - Fix b''.join(rand.choice(bytestring)..) to use bytes() constructor instead r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28107

--HG--
extra : moz-landing-system : lando
2019-05-28 14:26:10 +00:00
Justin Wood 043346856b Bug 1547730 - Use six.moves.xrange() instead of xrange() r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28106

--HG--
extra : moz-landing-system : lando
2019-05-28 14:25:49 +00:00
Justin Wood 7702de90f5 Bug 1547730 - do s/StringIO.StringIO/six.StringIO/ to support py3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28101

--HG--
extra : moz-landing-system : lando
2019-05-28 14:25:00 +00:00
Justin Wood a320da451c Bug 1547730 - do py3 for cStringIO r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28100

--HG--
extra : moz-landing-system : lando
2019-05-28 14:24:47 +00:00
Justin Wood 9237a957a8 Bug 1547730 - Allow testing of mozpack on py3 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28097

--HG--
extra : moz-landing-system : lando
2019-05-28 14:24:14 +00:00
Justin Wood f415f240f1 Bug 1547730 - use six.iterkeys() r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28119

--HG--
extra : moz-landing-system : lando
2019-05-28 14:24:07 +00:00
Justin Wood df3ad8c98b Bug 1547730 - Do dict.iteritems() via six to support py3. r=glandium
shellutil.py needed special handling since it is invoked earlier than the
vendor directory adding we do, so it does not have six available.

Differential Revision: https://phabricator.services.mozilla.com/D28096

--HG--
extra : moz-landing-system : lando
2019-05-28 14:23:47 +00:00
Justin Wood 80df2896d2 Bug 1542963 - Insert unicode_literals into python/mozbuild/mozpack and called mozbuild/* files. r=firefox-build-system-reviewers,chmanchester
Lint python/mozbuild/{mozbuild,mozpack}.

This makes sure we use byte strings (type(b'')) in many places.
This also has a few places where we know we want unicode, by enforcing it.

This code also has a few places where we call into windows API's which expect either all args to be unicode,
or all args to be bytestrings (not-unicode) so make sure those calls align.

This is the most risky of the stack, since there are some mach commands and codepaths that are neither excercised in automation
nor excercised in tests.

Differential Revision: https://phabricator.services.mozilla.com/D26645

--HG--
extra : moz-landing-system : lando
2019-05-28 14:23:25 +00:00
Justin Wood 8127e912fb Bug 1542963 - use print_function for mozbuild and mozpack. r=glandium
Lint python/mozbuild/{mozbuild,mozpack}.

Differential Revision: https://phabricator.services.mozilla.com/D26644

--HG--
extra : moz-landing-system : lando
2019-05-28 14:23:00 +00:00
Justin Wood a0d8057603 Bug 1542963 - Add absolute_imports to mozbuild and mozpack. r=glandium
Lint python/mozbuild/{mozbuild,mozpack}. r=#build

Add 'from __future__ import absolute_import' to all missing files in python/mozbuild/{mozbuild,mozpack}/**/*.py

Differential Revision: https://phabricator.services.mozilla.com/D26643

--HG--
extra : moz-landing-system : lando
2019-05-28 14:22:45 +00:00
Narcis Beleuzu 65e97bc31e Backed out 6 changesets (bug 1542963) for causing Bug 1552400. a=backout
Backed out changeset 70fbe1a158ae (bug 1542963)
Backed out changeset a1a84e0feabb (bug 1542963)
Backed out changeset 14aa1bd254a4 (bug 1542963)
Backed out changeset 11a714f491d5 (bug 1542963)
Backed out changeset 2715bac40d2f (bug 1542963)
Backed out changeset 8f69c7eeb6fd (bug 1542963)

--HG--
extra : histedit_source : 5903adc5313d6af4fdafb40ae55aaa79856f3726
2019-05-17 11:30:27 +03:00
Csoregi Natalia f243adfc89 Backed out 27 changesets (bug 1542963, bug 1547730) on request from Callek for DWE fails. CLOSED TREE
Backed out changeset 9e9c2e06d0fb (bug 1547730)
Backed out changeset d282ddabcb3d (bug 1547730)
Backed out changeset 3df19a96f8ac (bug 1547730)
Backed out changeset 27ff9602d80a (bug 1547730)
Backed out changeset 48f2c4980ad0 (bug 1547730)
Backed out changeset cef492de6a7f (bug 1547730)
Backed out changeset 59a1393697e0 (bug 1547730)
Backed out changeset 61b8fcc639e0 (bug 1547730)
Backed out changeset 2d6ba80390c8 (bug 1547730)
Backed out changeset 75879e53727c (bug 1547730)
Backed out changeset 03bdcaab1623 (bug 1547730)
Backed out changeset 6c9f98dacbde (bug 1547730)
Backed out changeset 3037f5bf1019 (bug 1547730)
Backed out changeset 3df74540bde3 (bug 1547730)
Backed out changeset 1891cfbb55d1 (bug 1547730)
Backed out changeset 16b1c53aba9d (bug 1547730)
Backed out changeset b7b1062d0aad (bug 1547730)
Backed out changeset aa2acfd554fc (bug 1547730)
Backed out changeset fa39fb43fd12 (bug 1547730)
Backed out changeset 35e2dc6ad347 (bug 1547730)
Backed out changeset 1b766ee6bf23 (bug 1547730)
Backed out changeset c846bf431b5c (bug 1547730)
Backed out changeset 042cdcc4e103 (bug 1547730)
Backed out changeset 81bc9014907e (bug 1547730)
Backed out changeset afa5801534e4 (bug 1547730)
Backed out changeset b4e024474194 (bug 1547730)
Backed out changeset 5f3c10562df3 (bug 1542963)
2019-05-16 20:17:46 +03:00
Justin Wood 0b152cd77c Bug 1547730 - Set python test annotations to correspond to currently-passing py3 tests r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28122

--HG--
rename : python/mozbuild/mozbuild/test/python.ini => python/mozbuild/mozbuild/test/python2.ini
rename : python/mozbuild/mozpack/test/python.ini => python/mozbuild/mozpack/test/python2.ini
extra : rebase_source : 686aa2def352c014bb2335e8f455204e3341b06b
extra : intermediate-source : 9adf517f4f79f071bc01526d3c9fe5545eeeda2f
extra : source : 31c6b4aca02221a3a173262ca02bc9cb9857da77
2019-04-18 15:52:34 -04:00
Justin Wood 6af7d5e25b Bug 1547730 - Finish up some final py3-izing in getting mozjar.py to work in py3 r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28120

--HG--
extra : rebase_source : d0561578250ee77b4d14907cdaf83e69c60b42ff
extra : intermediate-source : 3dce2de9ddc1c36a4564337ecdfc5f4d5ed751c5
extra : source : 6dac07ac6e344d3f034cefeedead4642c2d69949
2019-04-18 15:21:31 -04:00
Justin Wood b294b5deaf Bug 1547730 - Fix b''.join(rand.choice(bytestring)..) to use bytes() constructor instead r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28107

--HG--
extra : rebase_source : b630c75e57f967d70704dcffbbac0fa1aeb4e627
extra : intermediate-source : 59159c8d965b9f1fe7a8d7ac498f1e56489e578a
extra : source : 915a3ded66d8f598a8c6541dbbf842e5f12fc7e2
2019-04-15 15:26:30 -04:00
Justin Wood d7b09050eb Bug 1547730 - Use six.moves.xrange() instead of xrange() r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28106

--HG--
extra : rebase_source : acdaa3f79f373904856940fa2df7475b941ffb20
extra : intermediate-source : a81b134559b396b811246e619e4d44b6c466e4c3
extra : source : 9ddfc1afd4255d67288111b41ea94371e3308a48
2019-04-15 14:50:56 -04:00
Justin Wood 76d0c8183b Bug 1547730 - do s/StringIO.StringIO/six.StringIO/ to support py3 r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28101

--HG--
extra : rebase_source : 25292a350368f109b22350fedc066f2cd257b697
extra : intermediate-source : 284a97f47d5027b4d24c76f56bb133fea477555f
extra : source : 7e0974046e5680b87e4510df0dc3279be453ef9c
2019-04-14 22:18:34 -04:00
Justin Wood 68e0b22686 Bug 1547730 - do py3 for cStringIO r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28100

--HG--
extra : rebase_source : 419048b9789f19654bd6ceecc03f49e59fcf892d
extra : intermediate-source : ee3331ee87251ff67a9b55621d46efe655d58688
extra : source : ab5251d098f1f8bf9a6e258d26a6ab6b970421bf
2019-04-14 21:54:36 -04:00
Justin Wood 1ee18bb7cd Bug 1547730 - Allow testing of mozpack on py3 r=#build
Differential Revision: https://phabricator.services.mozilla.com/D28097

--HG--
extra : rebase_source : b144cfa0bf39dcc2b83b9835d3bff78fc584ff4a
extra : intermediate-source : 0e6ee14716921960659543fa96b4a77b6a94ad1d
extra : source : 67f44c65a566f23a61cd1d9060598c82308e873b
2019-04-14 21:19:18 -04:00