Commit Graph

1403 Commits

Author SHA1 Message Date
James Graham
2550468ec1 Bug 1497586 - Update mozlog version number for release, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D8114

--HG--
extra : moz-landing-system : lando
2018-10-10 15:53:34 +00:00
Raphael Pierzina
50207b9243 Bug 1471622 - Update dependency specifier for mozfile in mozrunner; r=davehunt
Depends on D8096

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

--HG--
extra : moz-landing-system : lando
2018-10-10 10:11:13 +00:00
Raphael Pierzina
866cdc914d Bug 1471622 - Update dependency specifier for mozfile in mozprofile; r=davehunt
Differential Revision: https://phabricator.services.mozilla.com/D8096

--HG--
extra : moz-landing-system : lando
2018-10-10 10:11:26 +00:00
Edwin Gao
7a26c4e550 Bug 1495596 - change how ADBAndroid checks for presence of 'ls' command r=bc,gbrown
Changes:

- changed the directory checked by the `/system/bin/ls` or `/system/xbin/ls` to be `/system`.
- factor out the directory to a single variable.

Checks:

- mozregression continues to function, checked with emulator
- try runs for all platforms look acceptable

Thoughts:

- error message slightly altered to address comment 10 on bugzilla, however this may not be enough.

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

--HG--
extra : moz-landing-system : lando
2018-10-05 16:00:32 +00:00
James Graham
43dd99c169 Bug 1275926 - Upstream grouping mozlog formatter from Servo, r=ahal
This is designed to produce minimal output; just show which tests are
running and then provide details at the end for tests that gave an
unexpected result.
2018-10-09 13:15:30 +01:00
Brindusan Cristian
693c2fa7e3 Backed out 2 changesets (bug 1275926) for linting failure on grouping.py. CLOSED TREE
Backed out changeset 0d5f2da0dce7 (bug 1275926)
Backed out changeset 4ee6bd59c115 (bug 1275926)
2018-10-09 14:48:53 +03:00
James Graham
1a638683d6 Bug 1275926 - Upstream grouping mozlog formatter from Servo, r=ahal
This is designed to produce minimal output; just show which tests are
running and then provide details at the end for tests that gave an
unexpected result.
2018-10-09 12:06:25 +01:00
Alex Gaynor
8c784a6c6d Bug 1498247 - Part 3 - switch from using the deprecated env::home_dir() to the dirs crate; r=jgraham
Depends on D8578

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

--HG--
extra : moz-landing-system : lando
2018-10-12 17:26:21 +00:00
Alex Gaynor
b796049372 Bug 1498247 - Part 1 - Add a dependency on dirs for getting the home directory; r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D8577

--HG--
extra : moz-landing-system : lando
2018-10-12 17:24:43 +00:00
Edwin Gao
b4f0f75efe Bug 1197370 - Add chown method to adb.py, refactor chmod r=bc
Behavior changes:

- added method for ADBDevice class called chown
- when initializing ADBDevice class, check if recursive flag is supported (similar to chmod -R)

Other changes:
- handling for situation where recursive is desired but -R flag is not supported is in place
- changed behavior above situation to mirror chmod (creation of temporary file based on `self.ls` output, then executing script on device using adb

Unit Tests:
- unit tests to exercise attributes and common paths created. Would need further expansion of tests at some point.
- additional mocking fixtures created.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 16:58:35 +00:00
James Graham
c32b272c7a Bug 1496452 - Don't log wpt manifest update when resolving tests r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D7732

--HG--
extra : moz-landing-system : lando
2018-10-05 16:46:52 +00:00
Csoregi Natalia
9d55d83f31 Merge inbound to mozilla-central. a=merge 2018-10-05 01:29:38 +03:00
Henrik Skupin
6156b8d1f5 Bug 1433905 - [mozprocess] poll() always returns None for stopped process until wait() is called. r=gbrown
If the process quits externally (shutdown by itself or via kill),
the poll method still returns None, even with the process not
existent anymore.

To fix that, the poll method should at least try to join the reader
thread once before checking if it is still alive. Otherwise it will
continue to run, and never stop.

Also the attribute existence check for "returncode" on the process
instance has to be removed because this property always exists.
Instead a check for the "returncode" property of the ProcessHandler
class is necessary.

Depends on D7396

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

--HG--
extra : moz-landing-system : lando
2018-10-04 14:51:32 +00:00
Henrik Skupin
0b6b3e94da Bug 1433905 - [mozprocess] Existence of _handle on Windows doesn't mean the process is still alive. r=gbrown
The assumption that when a handle is present for the process handler
on Windows doesn't mean that the process is still alive. It could
have already been externally killed, crashed, or closed itself.

The patch makes sure to check the process exit code, and run
clean-up steps if the process is already gone.

Depends on D7395

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

--HG--
extra : moz-landing-system : lando
2018-10-04 14:52:47 +00:00
Henrik Skupin
4a1ba8961f Bug 1433905 - [mozprocess] Fix broken path to process script for test_process_output_nonewline. r=gbrown
Depends on D7394

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:49:52 +00:00
Henrik Skupin
dc3840d283 Bug 1433905 - [mozprocess] "check_for_detached()" has to raise RuntimeError if process hasn't been started yet. r=gbrown
Calling "check_for_detached()" doesn't make sense if the process
hasn't been started yet, and as such has to raise a RuntimeError.

Depends on D7393

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:49:24 +00:00
Henrik Skupin
8744982dbc Bug 1433905 - [mozprocess] Retrieving pid has to fail with RuntimeError if process hasn't been started yet. r=gbrown
Instead of an AttributeError a RuntimeError has to be thrown if
the underlying process hasn't been created yet.

Depends on D7392

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

--HG--
extra : moz-landing-system : lando
2018-10-04 10:48:50 +00:00
Cosmin Sabou
f34bdc7e4b Backed out changeset 8660ad891a23 (bug 1495372) for causing win2012 bustages. a=backout 2018-10-04 02:25:45 +03:00
Cosmin Sabou
7244d89e06 Backed out changeset dcba2a476ccf (bug 1305743) on request from jgraham for causing issues with mozinfo.json. a=backout 2018-10-04 01:05:44 +03:00
Edwin Gao
ee7107754b Bug 1190701 - make ADBAndroidMixin.is_app_installed() unambiguous r=bc,gbrown
Behavior changes:
- ADBAndroidMixin.is_app_installed() will now perform a strict check on `app_name` provided. Previously, the behavior was to do a fuzzy match, where as long as the provided `app_name` matched some item on the list it would return True. Now, the exact string as shown when user calls `adb shell > pm list packages` will be required in order to generate a True return value.

Other changes:
- bumped mozdevice version to 1.1.2 reflecting minor behavior change.
- addition of unit tests for ADBAndroidMixin.is_app_installed() method call and surrounding helper methods such as mocked fixtures, manifest changes.

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

--HG--
extra : moz-landing-system : lando
2018-10-02 18:39:38 +00:00
James Graham
57c945674a Bug 1495372 - Unify wpt manifest download and update r=ato
The previous code split a lot of logic between the update and download
parts, and exposed two different mach commands. In order to simplify
things it's better to have a single entry point for manifest download
and update, and ensure that's called consistently.

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

--HG--
extra : moz-landing-system : lando
2018-10-03 15:43:44 +00:00
Geoff Brown
0b2be11c56 Bug 1495863 - Pass mozrunner adb path when creating ADBHost; r=bc 2018-10-02 16:55:10 -06:00
James Graham
8df230bb58 Bug 1495372 - Unify wpt manifest download and update, r=ato
The previous code split a lot of logic between the update and download
parts, and exposed two different mach commands. In order to simplify
things it's better to have a single entry point for manifest download
and update, and ensure that's called consistently.

Differential Revision: https://phabricator.services.mozilla.com/D7497
2018-10-04 14:19:38 +01:00
Andreas Tolfsen
4b95006f04 bug 1494613: mozprofile: add docs for Pref::new and ::new_sticky r=whimboo 2018-09-29 15:45:30 +01:00
James Graham
04f21f657a Bug 1494963 - Expose mozdebug's DebuggerInfo type r=ahal
Otherwise it doesn't work with multiprocessing, which breaks debugging wpt on Windows.

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

--HG--
extra : moz-landing-system : lando
2018-09-28 15:55:18 +00:00
Andrew Halberstadt
9e9fc55acc Bug 1470266 - [moztest.resolve] Make task regexes more resilient to change, r=jmaher
These regexes are used for things like determining which tasks to run given a
"path" int |mach try|. Previously, we used patterns like:

mochitest-chrome-(?:e10s)?(?:-1)?$

This would match both e10s and non-e10s versions of a task with either no
chunks, or only selecting chunk 1. But we keep adding other configurations, e.g
-gpu, -no-accel, -sw, etc.  Each time we create a new possibility we need to
remember to update these task regexes (or else lose test coverage when using
paths with |mach try|).

Instead of individually listing every possibility, let's use a pattern like
this:

mochitest-chrome($|.*(-1|[^0-9])$)

This also selects tasks that are either chunk 1 or don't have any chunks.  But
it allows for arbitrary strings in-between. This regex doesn't need to be
updated when we add configurations like -sw.

Depends on D7119

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

--HG--
extra : moz-landing-system : lando
2018-09-28 07:15:36 +00:00
Andrew Halberstadt
aebcf45519 Bug 1470266 - [moztest.resolve] Create a unittest for the task regexes, r=jmaher
I almost forgot to update the regexes in moztest.resolve when creating the -sw
variant of task. This adds a test to make sure we don't forget more things in
the future.

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

--HG--
extra : moz-landing-system : lando
2018-09-28 06:59:39 +00:00
Gurzau Raul
00b3974ac0 Backed out 5 changesets (bug 1494613) for failing at testing/geckodriver/src/marionette.rs
Backed out changeset 09e9cefc19ca (bug 1494613)
Backed out changeset f9f4e7c55d61 (bug 1494613)
Backed out changeset 457da8a172be (bug 1494613)
Backed out changeset 8d26a58f754e (bug 1494613)
Backed out changeset 729d8f3e1341 (bug 1494613)
2018-09-27 18:49:58 +03:00
Andreas Tolfsen
ed28f66567 bug 1494613: mozprofile: add docs for Pref::new and ::new_sticky r=whimboo
Depends on D7076

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

--HG--
extra : moz-landing-system : lando
2018-09-27 13:17:56 +00:00
Aaron Klotz
acee6df4f4 Bug 1494398: Bump mozrunner version to 7.1.0 to reflect wait-for-browser changes; r=wlach
Differential Revision: https://phabricator.services.mozilla.com/D6997

--HG--
extra : moz-landing-system : lando
2018-09-26 21:19:40 +00:00
Edwin Gao
f18ceae200 Bug 715884 - replace optparse usage with argparse r=jmaher
- changed argument parser to use ArgumentParser in compliance with Python 2.7.

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

--HG--
extra : moz-landing-system : lando
2018-09-26 13:57:53 +00:00
Edwin Gao
b8a91d1cf9 Bug 1305743 - Make failure to find mozinfo.json a fatal error r=gbrown,ahal
- moved placement of the raise_exception computation to be after the initial objdir path computation.
- original implementation was missing detection for cases where user may pass in a False flag to explicitly suppress errors.
- added unit tests to check for scenarios where raise_exception flag is passed in as part of positional argument.
- changed argument to include a **kwargs argument for caller to modify default exception behavior.
- default behavior is to raise exceptions if mozinfo.json cannot be found.
- disabled TreeMetadataEmitter from calling mozinfo.find_and_update_from_json and setting the self.info variable since it was not referenced anywhere else after the initial setup.

Depends on D6859

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

--HG--
extra : moz-landing-system : lando
2018-09-26 20:07:25 +00:00
Aaron Klotz
ad8a283d23 Bug 1488554: Part 4 - Make FirefoxRunner pass --wait-for-browser on Windows; r=ahal
Depends on D4972

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

--HG--
extra : moz-landing-system : lando
2018-09-26 19:11:55 +00:00
arthur.iakab
ec46826255 Merge inbound to mozilla-central. a=merge 2018-09-26 15:54:41 +03:00
James Graham
4c0e8cd2e6 Bug 1438975 - Sort logging options by formatter and support negative options r=ahal
Depends on D6819

Depends on D6819

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

--HG--
extra : moz-landing-system : lando
2018-09-25 19:45:27 +00:00
James Graham
cc7b5832aa Bug 1438975 - Add tbpl-like output for failing refests to the mach formatter r=ahal
This allows the output to be used in the reftest anaylzer directly.

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

--HG--
extra : moz-landing-system : lando
2018-09-25 19:42:46 +00:00
James Graham
caad927e35 Bug 1493674 - Fix up test resolver with out of tree manifest r=ahal
mach try fuzzy has some stronger requirements compared to mach test.

Depends on D6673

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

--HG--
extra : moz-landing-system : lando
2018-09-25 09:40:56 +00:00
Ciure Andrei
6760739b90 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2018-09-26 00:53:40 +03:00
Henrik Skupin
eb04193509 Bug 1438830 - [mozprocess] Track and kill detached processes on Windows. r=gbrown
Allow mozprocess to track and kill processes on Windows,
even when they got restarted.

Such processes are still part of the job object, but unless
the "JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE" flag is set, they
aren't getting closed.

Since our sandbox also creates jobs, we preferably want to
nest the sandbox's job inside the job as created by mozprocess.
Specifying "JOB_OBJECT_LIMIT_BREAKAWAY_OK" would allow
sandboxed processes within the job to break off and form their
own, separate job. This is actually necessary for sandboxing
to work on older versions of Windows without nested job support,
but on newer versions, we don't want them breaking away.

--HG--
extra : rebase_source : a485adc370127dfec86329f775df089b3b71eb47
2018-09-20 09:05:22 +02:00
Bob Clary
0b522a50c1 Bug 1485638 - [mozsystemmonitor] wrap Multiprocessing.Pipe.poll in _collect as well as in SystemResourceMonitor.stop, r=ahal. 2018-09-23 15:08:56 -07:00
Bob Clary
57cca45e9a Bug 1485638 - [mozsystemmonitor] Multiprocessing.Process should always be called with keyword arguments, r=ahal. 2018-09-23 15:08:56 -07:00
Dave Hunt
e0f982a753 Bug 1492341 - Bump mozrunner version to 7.0.2; r=tcsc
TPS is currently depending on mozrunner v7.0.1, which depends on an earlier version of mozprofile. For TPS to be able to use the latest version of mozprofile we need to release a new version of mozrunner with the recent mozprofile version identifier update.

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

--HG--
extra : moz-landing-system : lando
2018-09-20 16:33:56 +00:00
Ahilya Sinha
8f5e322404 Bug 1473915 - Set up infra so we can move the wpt-manifest out of tree r=gps
Changes the wpt manifest path to the topobjdir instead so it can be moved out of tree.
Other changes so that the manifest download and update, and |mach wpt| and |mach test <wpt-test>| work with the new path.
The manifest is also downloaded and updated when creating the tests-archive to ensure that it exists when we run tests on TC.

MozReview-Commit-ID: Fp6UsKJjhTU

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

--HG--
extra : moz-landing-system : lando
2018-09-20 12:07:58 +00:00
Bogdan Tara
9f17cab93a Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-20 01:03:35 +03:00
Raphael Pierzina
7cdbeffeb6 mozfile: Fix Python 3 compat issue in mozfile test_load.py (Bug 1492401) r=davehunt
This patch updates mozfile tests to use `wptserve` instead of `mozhttpd` and enables test_load.py for Python 3.5.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 17:53:35 +00:00
Raphael Pierzina
15087ce7c2 mozfile: Fix Python 3 compat issue in mozfile test_move_remove.py (Bug 1471622) r=ahal
This patch updates mozfile test_move_remove.py to use `open` instead of `file`
and enables the according test module for Python 3.5.

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

--HG--
extra : moz-landing-system : lando
2018-09-19 20:25:39 +00:00
shindli
d8f561f92f Backed out changeset dd80de19f142 (bug 1473915) for mb failures in testing/mozbase/moztest/tests/test_resolve.py CLOSED TREE 2018-09-19 18:13:48 +03:00
Ahilya Sinha
67be437f68 Bug 1473915 - Set up infra so we can move the wpt-manifest out of tree r=gps
Changes the wpt manifest path to the topobjdir instead so it can be moved out of tree.
Other changes so that the manifest download and update, and |mach wpt| and |mach test <wpt-test>| work with the new path.
The manifest is also downloaded and updated when creating the tests-archive to ensure that it exists when we run tests on TC.

MozReview-Commit-ID: Fp6UsKJjhTU

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

--HG--
extra : moz-landing-system : lando
2018-09-19 06:57:50 +00:00
Bob Clary
60e22167a6 Bug 1491424 - Define AndroidMixin as new class Mixin with proper initialization, r=gbrown.
As defined initially, AndroidMixin was an old-style class not inheriting from object. This
prevents it from being properly called via super() which requires it be a new style class
and also requires that its __init__ method's signature conform to the signatures of the other
mixin's __init_methods.

AndroidMixin originally detected the adb_path using BaseScript's query_exe which required that
the previous initializers complete prior to the call which is not possible. To work around the
problem, adb_path was turned into a property whose value was not looked up until requested.
The intent was to defer the need to reference attributes which had not yet been initialized.

BaseScript's __init__ iterates over the attributes of its object determining if listeners should
be attached for the methods. This can cause problems in mixins which define properties which
require a fully initialized object since accessing the property will invoke the method before it
is ready.

This is worked around in this patch by catching AttributeError in adb_path and ignoring it. The
proper fix however might be to do this catch in BaseScript's __init__ where item = getattr(self, k)
is called.

These changes are not sufficient in of themselves. The additional followup patch to CoverCoverageMixin
and SingleTestMixin are also required for AndroidMixin to be properly initialized.

Since Raptor currently initializes AndroidMix without explicitly giving a device serial number,
mozrunner's android_device.py is modified to export the detected device serial number into the
environment as DEVICE_SERIAL. This allows AndroidMixin to obtain the device's serial number.
2018-09-19 10:35:39 -07:00
arthur.iakab
1ee75a928a Merge inbound to mozilla-central a=merge 2018-09-19 05:18:50 +03:00
Edwin Gao
2514b44cdb Bug 1488590 - Add tests to mozdevice::adb.py r=ahal
Created tests/ subdirectory under mozdevice.
Added conftest.py and populated with wrappers for the methods under test.
Added test_socket_connections.py with basic tests for new methods and some coverage of legacy/deprecated methods.

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

--HG--
extra : moz-landing-system : lando
2018-09-18 19:35:40 +00:00
Aaron Klotz
9e357d1cf3 Bug 1489277: Skip mozrunner tests if running under automation; r=ahal!
Differential Revision: https://phabricator.services.mozilla.com/D5922
2018-09-14 16:26:57 -06:00
Aaron Klotz
8ff40206fc Bug 1491489: Add automation property to mozinfo.info; r=ahal!
When MOZ_AUTOMATION is set, then automation = true

Differential Revision: https://phabricator.services.mozilla.com/D5921
2018-09-14 17:42:13 -06:00
Andreas Tolfsen
3d48e987b5 bug 1466818: mozrunner: release 0.8.0; r=me 2018-09-16 00:32:18 +01:00
Andreas Tolfsen
a90e90dac3 no bug: mozprofile: release 0.4.0; r=me 2018-09-16 00:24:46 +01:00
Pavel Slepushkin
21f7f10fe9 Bug 1471888 - [mozprofile] Add support for Python 3. r=davehunt
Bug 1471888 - [mozprofile] Add support for Python 3.

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

--HG--
extra : moz-landing-system : lando
2018-09-11 18:58:05 +00:00
Henrik Skupin
281acf7f9c Bug 905404 - [mozprofile] Remove all default testing related preferences. r=ahal
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
2018-09-05 17:01:17 +02:00
Cosmin Sabou
80e58fff22 Backed out changeset 30ec08a53991 (bug 1471888) for awsy test failures. CLOSED TREE 2018-09-11 15:12:53 +03:00
Pavel Slepushkin
05853e660a Bug 1471888 - [mozprofile] Add support for Python 3. r=davehunt
Bug 1471888 - [mozprofile] Add support for Python 3.

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

--HG--
extra : moz-landing-system : lando
2018-09-11 11:34:50 +00:00
Xidorn Quan
044a4b8c2c Bug 1489017 - Locate devenv.exe via vswhere on Windows. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5117

--HG--
extra : moz-landing-system : lando
2018-09-07 14:59:55 +00:00
egao
be45c91042 Bug 1046146 - Change the way that mozdevice checks for the existence of a directory r=gbrown
Refactored the method by which ADBDevice checks for the presence of files or directories.
- created helper method _test_path(), which accepts a path and command line argument to the test command.
- modified existing methods to use the _test_path() method.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 18:33:22 +00:00
Bogdan Tara
f302cbb0b3 Merge inbound to mozilla-central. a=merge 2018-09-05 02:24:27 +03:00
egao
1a098a6537 Bug 1484238 - Add an 'adb_reverse' command to mozdevice.ADBAndroid r=gbrown,bc
Differential Revision: https://phabricator.services.mozilla.com/D4775

--HG--
extra : moz-landing-system : lando
2018-09-04 14:15:42 +00:00
ui.manish
a5ea6dfab9 Bug 1435552 Remove NO_EM_RESTART from test harnesses; r=gbrown 2018-08-31 15:33:32 +02:00
Andreas Tolfsen
c67e2dd198 Bug 1488006: mozprofile: derive Default for prefreader::Position. r=jgraham
The user might expect to be able to use Default as the type can be
constructed without arguments.
2018-09-04 14:29:01 +01:00
Andreas Tolfsen
ea994573f0 Bug 1488006: mozprofile: avoid incidental functional call; r=jgraham
There is a functional call after ok_or() which is called and
evaluated before escape_char is converted due to RHS evaluation.
We can avoid this by employing a closure with ok_or_else().
2018-09-04 14:29:01 +01:00
Andreas Tolfsen
5f5116a9ec Bug 1488006: mozprofile: deref token to avoid & prefix; r=jgraham
It is considered more idiomatic to dereference the match expression
than to peek at each variant through a reference.

This silences a clippy lint warning.
2018-09-04 14:29:00 +01:00
Andreas Tolfsen
3a22b09028 Bug 1488006: mozprofile: turn single-character strings into chars; r=jgraham
Where we have single-character strings we can convert them to chars
for efficiency.
2018-09-04 14:28:59 +01:00
Andreas Tolfsen
cc5b563e28 Bug 1488006: mozprofile: avoid identical conversions; r=jgraham
PrefReaderError::new already expects a &str.
2018-09-04 14:28:58 +01:00
Andreas Tolfsen
5c6ca540e3 Bug 1488006: mozprofile: loop over references to container; r=jgraham
It is considered more idiomatic Rust to loop over references to
containers rather than calling the iteration protocol's x.iter()
or x.into_iter() explicitly.
2018-09-04 14:28:58 +01:00
Andreas Tolfsen
129ea5a2a5 Bug 1488006: mozprofile: replace call to io::Write::write() with ::write_all(); r=jgraham
io::Write::write() is not guaranteed to process the entire buffer.
It returns how many bytes were processed, which may be smaller than the
given buffer's length.  mozprofile does not need to deal with partial
writes, so all the calls to ::write() may be replaced with ::write_all().
2018-09-04 14:28:57 +01:00
Andreas Tolfsen
70d1acfb74 Bug 1488006: mozprofile: prefer byte string literals to as_bytes() where possible; r=jgraham
Where string literals contain only ASCII characters, it is considered
better style to define byte strings using b"foo" rather than calling
"foo".as_bytes().
2018-09-04 14:28:56 +01:00
Andreas Tolfsen
da30cf1fa1 Bug 1488006: mozprofile: drop needless lifetimes; r=jgraham
Drops all the unnecessary lifetime definitions in mozprofile.
2018-09-04 14:28:56 +01:00
Andreas Tolfsen
4cf5f38cc9 Bug 1488006: mozprofile: avoid redundant field names in struct init; r=jgraham 2018-09-04 14:28:55 +01:00
Andreas Tolfsen
6064b9610a Bug 1488006: mozprofile: format code; r=jgraham
No functional changes, apart from running all the code through
rustfmt prior to fixing clippy lint warnings.
2018-09-04 14:28:55 +01:00
Andreas Tolfsen
397e3d27d5 Bug 1488007: mozversion: format; r=jgraham
No functional changes, except applying rustfmt.
2018-09-04 13:46:38 +01:00
Andreas Tolfsen
7b7c50ebb6 Bug 1488007: mozversion: lint; r=jgraham
Address clippy lint warnings in mozversion.
2018-09-04 13:46:38 +01:00
Bob Clary
705ee14361 Bug 1487220 - [mozrunner] Add a loop to the raw_input in verify_android_device to check if user actually installed app, r=gbrown. 2018-08-30 19:04:46 -07:00
Preeti Mukherjee
bfa8d74f55 Bug 1471920 - [mozbuild] Use shutil.which in Python 3 instead of vendored third-party package r=davehunt
Use shutil.which in mozbuild for Python 3 instead of vendored third-party package, and enable mozversion tests that are fixed under Python 3 by this change.

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

--HG--
extra : moz-landing-system : lando
2018-08-30 16:39:55 +00:00
Bob Clary
c4b7cb740f Bug 1487130 - [mozdevice] Update version to 1.1.0, r=wlach 2018-08-29 10:57:52 -07:00
Bob Clary
7cb17b8a34 Bug 1485855 - [mozdevice] adb.py Do not attempt to chmod external storage as it will not affect permissions and will fail on unrooted devices, r=jmaher. 2018-08-27 06:59:21 -07:00
Bob Clary
6226063bcc Bug 1485854 - [mozdevice] make adb.py _check_adb_root more resilient to differing outputs, r=jmaher. 2018-08-27 06:59:21 -07:00
Bob Clary
4d434dc3ed Bug 1485852 - [mozdevice] rework SELinux support in adb_android.py, r=jmaher. 2018-08-27 06:59:21 -07:00
Bob Clary
2de74229da Bug 1485852 - [mozdevice] adb*.py should use require_root parameter to control root detection, r=jmaher. 2018-08-27 06:59:21 -07:00
Bob Clary
cc3c6c78b2 Bug 1485850 - [mozdevice] document adb*.py timeout and verbose parameters in all classes, r=jmaher. 2018-08-27 06:59:21 -07:00
Raphael Pierzina
37d1b753d2 Convert mozhttpd's test suite to pytest (Bug 1479420) r=davehunt
Currently mozhttpd's test suite uses Python's unittest. Several tests don't
shut down started MozHttpd server instances, resulting in blocking test runs.
This patch resolves that problem by using pytest fixtures.

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

--HG--
extra : moz-landing-system : lando
2018-08-20 15:55:18 +00:00
Akshay Chiwhane
5d96779c1c Bug 1465046 - Remove ProcessHandler.waitForFinish(). r=whimboo
--HG--
extra : rebase_source : 9df8444de596c5868efd18c62054f321513b99d6
2018-08-20 21:28:21 +02:00
Bob Clary
b6ff47bfe1 Bug 1482888 - Allow fennec to record audio, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
fbae2d44ea Bug 1482884 - During adb push check if remote directory exists before removing basename for adb 1.0.36 and later, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
fbd6d3dfca Bug 1482878 - Use screencap to capture on physical android device screenshots, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
ac89381d02 Bug 1482874 - Detect anr traces directory, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
92e11808e8 Bug 1482873 - Do not check for su 0 id if su -c id is supported, r=gbrown.
This works around a hang on Pixel 2 8.1.0/OPM2.171019.029.B1/4720900
rooted via Magisk where su 0 id will hang.
2018-08-18 10:47:11 -07:00
Tiberius Oros
fffda63981 Backed out changeset aaabe6d53de2 (bug 1428713) for causing Bug 1483850 a=backout 2018-08-17 00:17:04 +03:00
dvarga
87db76ae1a Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : rebase_source : c9e6b9edae9ecf064d1318fa15d5d57ea42c102a
2018-08-16 01:22:36 +03:00
Pavel Slepushkin
01b4686deb Bug 1428713 - [mozprocess] Add support for Python 3 r=davehunt
MozReview-Commit-ID: 9wHoIEboA0K

--HG--
extra : rebase_source : f1b1c3a1dcbcd9038adb7a149fc00f7c1849d6e1
2018-08-04 17:32:57 +02:00
Geoff Brown
2b831a4422 Bug 1483563 - Remove 'mach autophone'; r=bc
Autophone has been retired.
2018-08-15 12:54:08 -06:00
Andreas Tolfsen
8f5737840d Bug 1483288 - Provide more number conversions for mozprofile::preferences::PrefValue. r=whimboo
Allow i8, u8, i16, u64, i32, and u32 to be implicitly converted into
PrefValue::Int.  u64 is not supported because it would overflow,
so this still needs to be handled manually.

geckodriver stores the port number as u8 and this will allow it to
implicitly convert it to PrefValue::Int without using the unsafe
"as i64" coercion.
2018-08-15 15:49:09 +01:00
Brindusan Cristian
6a85eae780 Backed out changeset d08617053829 (bug 1428713) for awsy-base failures. CLOSED TREE 2018-08-15 16:46:18 +03:00
Pavel Slepushkin
2022970c76 Bug 1428713 - [mozprocess] Add support for Python 3 r=davehunt
MozReview-Commit-ID: 9wHoIEboA0K

--HG--
extra : rebase_source : ef02475141a1c2d7aa1fb95e2da637b6c033c35f
2018-08-04 17:32:57 +02:00
William Lachance
d65b9942a2 Bug 1482898 - Support running adb commands in mozdevice as non-root;r=bc 2018-08-13 10:51:12 -04:00