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
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
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
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
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
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
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
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
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
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
- 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
- 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
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
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
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
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
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
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
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
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.
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
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