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
Originally landed as changeset 8793e332890e via bug 1433905 the
patch caused a regression because GetExitCodeProcess() returns
0 for an inside of Firefox restarted process.
It can be relanded once the process id of the job object can
successfully be tracked.
Differential Revision: https://phabricator.services.mozilla.com/D9020
--HG--
extra : moz-landing-system : lando
The current implementation waits for fennec to stop before trying to stop it - easy enough
to address. At the same time, I am updating the runner stop implementation to try
stop_application before kill: stop_application shuts down the application more
cleanly; kill should only be used as a backup.
--HG--
extra : source : d95463150a6fccfc51fe190693d2528cbeec49a4
Add the property lsan-max-stack-depth to enable configuring how many
stack frames we allow LSANLeaks to record.
Differential Revision: https://phabricator.services.mozilla.com/D8192
--HG--
extra : moz-landing-system : lando
[mozfile] Bump version to 2.0.0, update classifiers and add setup.cfg (Bug 1471622)
Differential Revision: https://phabricator.services.mozilla.com/D6905
--HG--
extra : moz-landing-system : lando
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
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.
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.
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
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
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
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().
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.
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.
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().
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().
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
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
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.
It's unclear how this situation can actually happen, but it has caused a couple of
intermittents.
Differential Revision: https://phabricator.services.mozilla.com/D2355
--HG--
extra : moz-landing-system : lando
Bump the version number to 3.8, incorporating the LSAN changes. This
minor version bump assumes that mozlog consumers are supposed to
handle unknown actions gracefully (i.e. by ignoring them) and
therefore adding actions doesn't count as a compat-breaking change.
MozReview-Commit-ID: ECsDTuUgkfQ
This is a copy for now rather than a move because followup patches are
going to convert the LSAN support to use mozlog and I don't want to
risk breaking mochitest by accident.
MozReview-Commit-ID: I6NVgjDjsX2