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

77 Коммитов

Автор SHA1 Сообщение Дата
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
J.C. Jones 942507de3e Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-16 17:35:49 +00:00
Csoregi Natalia 5f6f55422f Backed out changeset 5c137b3793a7 (bug 1594931) for failures on test_sdr_preexisting.js. CLOSED TREE
--HG--
rename : security/manager/ssl/tests/unit/test_broken_fips/key4.db => security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db
2019-12-16 18:52:41 +02:00
J.C. Jones 4916451c01 Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-14 18:52:26 +00:00
Andreea Pavel 1adff31cb1 Backed out changeset 7d55de92c194 (bug 1594931) for failing xpcshell at test_sdr_preexisting.js on a CLOSED TREE
--HG--
rename : security/manager/ssl/tests/unit/test_broken_fips/key4.db => security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db
2019-12-13 22:48:02 +02:00
J.C. Jones 515c7f644c Bug 1594931 - Stop compiling NSS' DBM legacy database r=kjacobs,keeler,mhowell,MattN
This change removes the legacy libnssdbm database that we migrated away from since Firefox 60.

This change modifies all tests that use key3/cert8 to use the new files. It
removes test_sdr_upgraded_with_password, as without the upgrade part that is now
the same test as test_sdr_preexisting_with_password. It otherwise removes support for libnssdbm everywhere in Gecko.

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

--HG--
rename : security/manager/ssl/tests/unit/test_sdr_preexisting/key4.db => security/manager/ssl/tests/unit/test_broken_fips/key4.db
extra : moz-landing-system : lando
2019-12-13 19:00:35 +00:00
Mike Hommey 9f33118c8c Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

... except when building the newly added tools/update-packaging,
which builds the mar tool as a standalone thing, and building signmar
as well causes complications.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 19:01:03 +00:00
Bogdan Tara 4d6dbdf94c Backed out 2 changesets (bug 1562952) for causing mar-tools failures a=backout
Backed out changeset 6b09d4c0868c (bug 1562952)
Backed out changeset 250696e18e7d (bug 1562952)
2019-07-12 00:04:53 +03:00
Mike Hommey c957b25a9f Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 06:09:02 +00:00
Andreea Pavel 5d60cdbd27 Backed out 2 changesets (bug 1562952) for failing xpcshell at test_create.js on a CLOSED TREE
Backed out changeset 12099ffad9ca (bug 1562952)
Backed out changeset fc4a6e8f6e34 (bug 1562952)
2019-07-10 11:06:58 +03:00
Mike Hommey 1c3ea4d6bf Bug 1562952 - Always build signmar when mar is built. r=nalexander
When we build mar, there is no reason not to build signmar as well. It
used to be optional because not all platforms were supported, but they
are now.

--disable-verify-mar is kept to still allow to disable mar verification in
the updater for debugging purpose.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 03:17:26 +00:00
Victor Porof 8c3cfe4881 Bug 1561435 - Format modules/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 3faab607a196e49a51059a8639b8e44afb078edc
2019-07-05 10:54:01 +02:00
Ian Moody 17422d41ac Bug 1539176 - modules/ manual ESLint no-throw-literal fixes. r=rstrong
Differential Revision: https://phabricator.services.mozilla.com/D25651

--HG--
extra : moz-landing-system : lando
2019-04-02 13:41:10 +00:00
Mark Banner dba6983e75 Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:14 +00:00
Ya'ar Hever 531ae2db82 Bug 1501932 - Enable ESLint for modules/ (automatic changes). r=njn,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D14645

--HG--
extra : moz-landing-system : lando
2019-02-15 20:03:05 +00:00
June Wilde 3dba77a779 Bug 1468556 - Protect against overlapping files in libmar; r=mhowell
Disallows files from referencing the same bytes in the content blocks of a MAR
file by storing a list of structs containing a file's byte offsets and lengths.
A list was chosen since the cap of 256 files wouldn't produce considerable
overhead when extracting/reading/searching/etc through the archive.

Removing the ability for a MAR file to reference the same content block
repeatedly seems like a better solution than what was suggested in the BLRG
report. (limiting the number of files or checking for overly large
decompressed files)

Allows us to prohibit this type of file bomb while only losing an attribute
of the MAR file format that wasn't being leveraged. The fix is applied in
mar_enum_items and mar_find_item so that the manifest the updater uses is
equally safeguarded as the mar host tool.

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

--HG--
extra : moz-landing-system : lando
2018-11-26 17:25:24 +00:00
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Ted Mielczarek dcdf597820 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e
2018-01-10 14:26:12 -05:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Gurzau Raul bbe856eaf5 Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul
Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
2018-01-23 02:01:43 +02:00
Ted Mielczarek 2a410dbcc3 bug 1255485 - build PROGRAMs directly in dist/bin instead of copying them. r=nalexander
Historically we built all our binaries in directories in the objdir, then
symlinked them into dist/bin. Some binaries needed to be copied instead
so that certain relative path lookups work properly, so we resorted to
sprinkling `NSDISTMODE=copy` around Makefiles.

This change makes it so we build PROGRAMs (not any other sort of targets)
directly in dist/bin instead. We could do the same for our other targets
with a little more work.

There were several places in the tree that were copying built binaries to
some other place and needed fixup to match the new location of binaries.

On Windows pdb files are left in the objdir where the program was
originally linked. symbolstore.py needs to locate the pdb file both to
determine whether it should dump symbols for a binary and also to copy
the pdb file into the symbol package. We fix this by simply looking for
the pdb file in the current working directory if it isn't present next
to the binary, which matches how we invoke symbolstore.py.

MozReview-Commit-ID: 8TOD1uTXD5e

--HG--
extra : rebase_source : 9140be949b206bb595d9188ce7e8357347ecd9a9
2018-01-10 14:26:12 -05:00
Florian Quèze 0f55cd45be Bug 1421992 - script-generated patch to replace do_execute_soon, do_print and do_register_cleanup with executeSoon, info and registerCleanupFunction, rs=Gijs. 2017-12-21 11:10:23 +01:00
Florian Quèze 032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Robert Strong 7b64a51b7d Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 3 - libmar test extracted SHA384 signatures from the test mar files. r=mhowell, a=app_update_sha384 2017-07-30 23:27:36 -07:00
Robert Strong 151b7a59bc Bug 1105689 - use SHA384 certificates to sign app update mar files. Part 2 - libmar test mar files signed with a SHA384 cert. r=mhowell, a=app_update_sha384 2017-07-30 23:27:32 -07:00
Robert Strong 6847e81a18 Bug 641212 - use lzma compression for application update. Part 3 - test changes to support the new test mar file size and additional logging. r=mhowell, a=app_update_lzma 2017-07-30 23:27:05 -07:00
Mark Banner 16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Mike Shal 020f0e804c Bug 1320991 - Support --with-system-{nss,nspr} in modules/libmar; r=glandium
The problem with the modules/libmar/tests/moz.build file when building
--with-system-nspr and --with-system-nss is that the nss libraries don't
exist in the tree, so they fail when trying to copy into the test
directory.

However, it turns out that the libraries copied into the test directory
aren't even used when building with an in-tree copy, because the
xpcshell launcher sets LD_LIBRARY_PATH to point to dist/bin. Since we
use the dist/bin copies anyway for an in-tree build, we can stop copying
them into the test directory and simultaneously fix the --with-system
build.

The DEFINES can also go away since this directory doesn't actually build
anything.

MozReview-Commit-ID: Bk2f28wc9ZJ

--HG--
extra : rebase_source : 63683bbc0c9624121067268cfe6dce0f93b7fbd2
2016-12-20 16:37:18 -05:00
Robert Strong a27aa51a9e Test changes for Bug 1321951 - Use the same mar files on all platforms for libmar tests and general libmar test cleanup. r=mhowell 2016-12-12 16:57:13 -08:00
Robert Strong 87667f8289 Test data files for Bug 1321951 - Use the same mar files on all platforms for libmar tests and general libmar test cleanup. r=mhowell
--HG--
rename : modules/libmar/tests/unit/data/win_0_sized_mar.mar => modules/libmar/tests/unit/data/0_sized.mar
rename : modules/libmar/tests/unit/data/win_1_byte_mar.mar => modules/libmar/tests/unit/data/1_byte.mar
rename : modules/libmar/tests/unit/data/win_binary_data_mar.mar => modules/libmar/tests/unit/data/binary_data.mar
rename : modules/libmar/tests/unit/data/manipulated_signed_mar.mar => modules/libmar/tests/unit/data/manipulated_signed.mar
rename : modules/libmar/tests/unit/data/win_multiple_file_mar.mar => modules/libmar/tests/unit/data/multiple_file.mar
rename : modules/libmar/tests/unit/data/win_multiple_signed_no_pib_mar.mar => modules/libmar/tests/unit/data/multiple_signed_no_pib.mar
rename : modules/libmar/tests/unit/data/win_multiple_signed_pib_mar.mar => modules/libmar/tests/unit/data/multiple_signed_pib.mar
rename : modules/libmar/tests/unit/data/multiple_signed_pib_mar_2.mar => modules/libmar/tests/unit/data/multiple_signed_pib_2.mar
rename : modules/libmar/tests/unit/data/no_pib_mar.mar => modules/libmar/tests/unit/data/no_pib.mar
rename : modules/libmar/tests/unit/data/win_signed_no_pib_mar.mar => modules/libmar/tests/unit/data/signed_no_pib.mar
rename : modules/libmar/tests/unit/data/win_signed_pib_mar.mar => modules/libmar/tests/unit/data/signed_pib.mar
rename : modules/libmar/tests/unit/data/signed_pib_mar_with_mycert2.mar => modules/libmar/tests/unit/data/signed_pib_with_mycert2.mar
2016-12-12 16:56:58 -08:00
Sebastian Hengst 3f0d668bb5 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: modules. r=RyanVM
MozReview-Commit-ID: 2tN5AOxZVvU

--HG--
extra : rebase_source : dc9c12b6669fcd72be5042ac19016d8924dcc2ad
2016-11-05 11:29:21 +01:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Mike Shal 70e702783f Bug 1253775 - Remove libmar and libbz2 Makefile.ins; r=ted
MozReview-Commit-ID: aF8PmM0KvF

--HG--
extra : rebase_source : 865188be58878ce6e60ac3af9edd52e1b2bacf5b
2016-03-04 19:03:18 -05:00
ISHIKAWA, Chiaki be2b50a7f8 Bug 1248252 - Improper outdated octal constant syntax in M-C tree. Use '0o' prefix. r=dao
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check

 - the outdated 0666 octal constant is still parsed correctly,
 - the outdated 0666 octal constant raises syntax error flag
   in strict mode, etc.

So leave them alone.
2016-02-15 08:57:00 +01:00
Mike Hommey 6627ef45a4 Bug 1235676 - Replace $(abspath $(DEPTH)) with $(topobjdir). r=mshal 2015-12-31 08:10:02 +09:00
Hiroyuki Ikezoe bf31e06927 Bug 1167627 - Part 2: Use mozinfo in modules/libmar/. r=rstrong 2015-10-11 21:48:00 +02:00
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Shu-yu Guo 64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
Andrew Halberstadt d292ee73f1 Bug 1066735 - Remove root b2g and android specific xpcshell manifests, r=chmanchester 2014-10-07 18:18:28 -04:00
Nathan Froyd 4a5959372c Bug 1062874 - part 2 - don't preprocess head_libmar.js; r=ted 2014-09-02 13:46:10 -04:00
Nathan Froyd 74632e9bd3 Bug 1062874 - part 1 - remove preprocessor-requiring bits from head_libmar.js.in; r=bbondy 2014-09-02 13:18:39 -04:00
Stephen Pohl 0cf1dbaebb Bug 978597: Implement native MAR verification for OS X 10.6. r=smichaud 2014-04-22 20:45:59 -04:00
Stephen Pohl 53be662026 Bug 978596: Implement native MAR verification for OS X 10.7+. r=bbondy, rstrong, smichaud 2014-04-08 10:06:56 -04:00
Mike Hommey 8fd06cf41b Bug 874266 - Move all DEFINES that can be moved to moz.build. r=mshal 2013-11-27 22:55:07 +09:00