The following python-test paths are being moved out of 'make check' and into their own task:
- python/mozlint
- testing/mozbase
- tools/lint
The following python-test paths previously did not run on Windows:
- python/mozterm
- testing/marionette
- testing/raptor
- tools/tryselect
MozReview-Commit-ID: C07FANaYzf7
Depends on D10758
Differential Revision: https://phabricator.services.mozilla.com/D10759
--HG--
extra : moz-landing-system : lando
Parsing prefs and env on the command line is a common task performed by our harnesses, let's
move it into mozbase.
Depends on D9717
Differential Revision: https://phabricator.services.mozilla.com/D9796
--HG--
extra : moz-landing-system : lando
This uses nsIPrefService.readUserPrefsFromFile to set preferences from a
user.js passed in via the python harness. This allows us to use the profiles
under testing/profiles like all the other harnesses and will make setting prefs
in xpcshell easier to use and understand.
Differential Revision: https://phabricator.services.mozilla.com/D9716
--HG--
extra : moz-landing-system : lando
This uses nsIPrefService.readUserPrefsFromFile to set preferences from a
user.js passed in via the python harness. This allows us to use the profiles
under testing/profiles like all the other harnesses and will make setting prefs
in xpcshell easier to use and understand.
Differential Revision: https://phabricator.services.mozilla.com/D9716
--HG--
extra : moz-landing-system : lando
All preferences which were previously set for test harnesses are
part of testing/profiles now. As such they can all be removed.
--HG--
extra : rebase_source : 3feaac102f7b8a63ec4f07d84e121f26c49ce3c0
extra : histedit_source : e5b474e75d9f2c372c6439502fa1b30c8727e133
Neither package has any backwards incompatible changes. However, I decided to
bump the major version for mozrunner as this is the first time it's switching
to SemVer (mozprofile already made the switch). It seemed cleaner to have the
switch happen after a major bump.
In both cases, I've added major version upper limit guards to each dependency.
This way we won't break these packages in the future when we land backwards
incompatible changes to the dependendencies.
MozReview-Commit-ID: 5SIpMGTS3cc
--HG--
extra : rebase_source : 43ab4c9f3af50eb82a22ec3112e5b56fe703dbc6
In Chrome it doesn't seem to be possible to install extensions by dropping them
in the profile directory. Instead we use the --load-extension command line
argument. To that end the ChromeProfile uses a 'dummy' AddonManager() class
that is actually just a list with an 'install' method. Mozrunner will be
responsible for building the command line based on this list.
We also need a few other command line arguments to build and create a temporary
profile directory.
MozReview-Commit-ID: HC2p2ZZMl66
--HG--
extra : rebase_source : 2d748893e8530a312afb5d8b1442a4c29f93caf1
In addition to Profile, this will be implemented by the ChromeProfile class in
the next commit. This way we can test for 'isinstance(profile, BaseProfile)'
when we just want to test for a profile regardless of application.
Ideally I would have preferred 'Profile' itself to be the base class (and co-opt
FirefoxProfile to be the new defacto class for firefox profiles), but this would
break backwards compatibility.
MozReview-Commit-ID: 6TTFq2PQOGM
--HG--
extra : rebase_source : 57651887061ec52b176729109271ee2e23552cdb
This will make it a bit easier for consumers to create a profile instance. They
can just call:
profile = create_profile('firefox', prefs=...)
Instead of needing to first find the class, then do the instantiation.
MozReview-Commit-ID: 7FqAGsSyZVe
--HG--
extra : rebase_source : 3172189618d6948959edfc61d6782373d27a2cbb
This is a much cleaner and easier to understand test format. It will also make
it easier to add tests for the upcoming ChromeProfile changes.
MozReview-Commit-ID: DizKGt0qkPF
--HG--
rename : testing/mozbase/mozprofile/tests/addonid.py => testing/mozbase/mozprofile/tests/test_addonid.py
rename : testing/mozbase/mozprofile/tests/bug758250.py => testing/mozbase/mozprofile/tests/test_bug758250.py
rename : testing/mozbase/mozprofile/tests/permissions.py => testing/mozbase/mozprofile/tests/test_permissions.py
rename : testing/mozbase/mozprofile/tests/server_locations.py => testing/mozbase/mozprofile/tests/test_server_locations.py
extra : rebase_source : 07953fd02a8592ed31e1972d646ff93bfd25d80b
This is mainly to pick up bug 1448221 since the version of mozprofile on pypi can't
install addons with nightly anymore (due to the profile/extensions/staged directory
not being supported).
But since that change I've also landed several backwards incompatible API changes to
how addons are installed.
Bumping to 1.0.0 because I'd like us to start (attempting) to follow SemVer:
https://semver.org/
MozReview-Commit-ID: FDIPqNnSKJ6
--HG--
extra : rebase_source : 4e083b77802c97b85436410b40225ad234b9e7fb
The patch correctly marks the delimiters for the tree output
as Unicode, and also updates mozprofile to correctly serialize
the Profile object when str() is used.
MozReview-Commit-ID: AjUHa6zGHQe
--HG--
extra : rebase_source : d4fa6c5db91184dee6a2abe788aa23d0c6255be6
I missed a couple of references in cleanup code. This wouldn't have caused any
failures but might result in addons not being cleaned up properly.
MozReview-Commit-ID: BX0oX2GRGWT
--HG--
extra : rebase_source : 2193adb4e96b8e70faa6ffb1afd6db698b10ad2d
While we are removing a bunch of stuff and breaking backwards compatibility, I
figured this would be a good time to also change some of the APIs. These APIs
aren't used much in mozilla-central (and this patch updates the few places that
do).
This rolls the 'install_addons()' and 'install_addon_from_path' method into a
single 'install' method. This install method can accept a string or list of
paths to an individual addon (directory or .xpi), or a directory containing
addons.
This also renames Profile.addon_manager to Profile.addons, which reads better.
MozReview-Commit-ID: 7vDPnG4cKqu
--HG--
extra : rebase_source : 62f8613b9824e06e698d5af8dcbb4bcb07b8079e
This is another seemingly unused feature in mozilla-central.
Being able to download addons in AddonManager is a violation of the single
responsibility principle. If consumers *really* need to download addons, they
can easily do so with requests and then pass the file path in to AddonManager
like normal. There's no need to have this baked into AddonManager itself.
MozReview-Commit-ID: IorG0foiHfT
--HG--
extra : rebase_source : 27b4162d9adfb986c2b9822c12b6abc5a2561a9a
This feature isn't used anywhere in mozilla-central that I can tell. Because
using a manifest is the only way to install an addon from AMO, that ability has
also been removed with this commit.
MozReview-Commit-ID: BNFGPWdo96t
--HG--
extra : rebase_source : 9bc7c9c7e91b01b71082f763fb6e621c430de808
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.
This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`. If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.
Of course, being specific is often better than a catch all.
MozReview-Commit-ID: FKx80MLO4RN
--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
Minor note:
reftests should've turned off uploadEnabled in the first place.
reftests should have unified telemetry on. It's the future.
MozReview-Commit-ID: 9spzuUAXwwP
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.
These files were modified by running:
autopep8 --select E305 --in-place -r <dir>
on the affected directories. I did it one dir at a time and verified the result after each.
MozReview-Commit-ID: FmlsfiKIbtr
--HG--
extra : rebase_source : 9df32258cadff5d27a0e72113c57f782756c0b18