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
Also include webgl2-deqp, which we would like to run eventually, but not yet.
MozReview-Commit-ID: CY4hYCI95ws
--HG--
extra : rebase_source : 9973df0f905bb65d2e8b8c66a6a57e8869e527c1
Also include webgl2-deqp, which we would like to run eventually, but not yet.
MozReview-Commit-ID: FDWdu1J0end
--HG--
extra : rebase_source : a47d88cb2c5eb82e4dfaa9e58d76acbf0736d35d
Summary: Bug 1469933 When using ./mach run --debugger=windbg, use the x64 version of WinDBG r?ted
Reviewers: ted
Reviewed By: ted
Bug #: 1469933
Differential Revision: https://phabricator.services.mozilla.com/D1730
--HG--
extra : amend_source : 67de4dae3a129df77976da82005acb47ad64b5ed
Start Firefox with -foreground and -no-remote arguments if they
have not already been given by the user.
-foreground will ensure the application window gets focus when
Firefox is started, and -no-remote will prevent remote commands to
this instance of Firefox and also ensure we always start a new instance.
MozReview-Commit-ID: LGEqgyHYapc
--HG--
extra : rebase_source : 50054e89106421dc6b43bc1f109dc75db37dfd2d
The std::process::Command's stdout and stderr is configured earlier in
::start(), and resetting it to a static value below would invalidate the
configured stdout and stderr stored in FirefoxRunner::stdout and ::stderr.
We did not notice this bug because geckodriver does not
yet use this feature. It was added as a precursor for
https://bugzilla.mozilla.org/show_bug.cgi?id=1466573.
MozReview-Commit-ID: CmwqCZpEMqq
--HG--
extra : rebase_source : 209d7cdde8b05db9b7e6f02b221c32a436f2ecdf
Bug 1464995 broke mozrunner on macOS, but we did not notice because
geckodriver is not compiled on macOS. This fixes the build.
MozReview-Commit-ID: GnvZTT30wHG
--HG--
extra : rebase_source : 6e5b5b37d0c962c75a2a4b41c004f9cf47c2e8a2
mach android-emulator currently supports 6 different avds; I am struggling to maintain
that many configurations. I don't see a lot of value in keeping both 6.0 and 7.0,
and Android 6.0 is not as popular as 7.0. Let's remove 6.0, encouraging 7.0 as an
alternative; same for x86-6.0 -> x86-7.0.
mozrunner fails to locate the correct binary if Firefox is found
under a "firefox" or "firefox-bin" (depending on the system)
because it thinks the parent directory is the executable.
On Unix systems, mozrunner also falsely reports non-executable
files as valid binaries.
This patch introduces a new mozrunner::path module that provides
two functions: one for searching the system path for a binary by a
given name, and another for checking whether a path is an executable
binary file.
MozReview-Commit-ID: 6N06CXZZWqd
--HG--
extra : rebase_source : dbcb4d6d8478bafc23c1aa2a3081589074908bbc
Removes an unnecessary as_ref() cast, a path coercion, and replaces
try!() with ?.
MozReview-Commit-ID: ASd9kNxDZ3n
--HG--
extra : rebase_source : fa88def64fc3c7ea4520403bfc7b5c391d7f83da
The method we use to find the Firefox binary varies from platform
to platform. It can be useful to document how each of the system
specific implementations are meant to work.
MozReview-Commit-ID: 4SrNmlp3AdS
--HG--
extra : rebase_source : f1d54548edb416912af3a0a6d41188d0640a3ffb
Parent tests may also have stacktraces and this patch prints and
formats them the same way we do for subtests' stacks.
MozReview-Commit-ID: 64gfPWuQnHd
--HG--
extra : rebase_source : 6a37eda231091d66a92226c3ebadb7b7980766be
Instead of downloading the build artifacts (rather hackily) in moztest.fixtures, this now happens
directly in the taskgraph module via the run-task script.
For now extraction and setup happens in the task's command key. It might be a good idea to figure
out a syntax to tell run-task to do this extraction, e.g something like:
run:
using-artifacts:
build:
target.tar.bz2:
extract: true
path: /home/worker/build
name: firefox
But for now I wanted to avoid this extra complexity, so maybe it could be done in a follow-up.
MozReview-Commit-ID: KOhFFpFdP7Y
--HG--
extra : rebase_source : dcea36661fa9c6442c76c850ccc67f8f6d924fda
Before this patch, the x86-6.0 and x86-7.0 Android emulators were
unusable on macOS (tested 10.13.4 High Sierra).
The emulator's UI appears (but with black screen), and the launcher
icon in the dock has a default folder icon instead of the emulator.
When I use "mach android-emulator --version=x86-6.0 --verbose",
then the full emulator command is printed. I discovered that
using the newer QEMU 2 engine ("-engine qemu2") fixes the issue, and
that the emulator launches as expected. This option is documented at:
https://developer.android.com/studio/run/emulator-commandline
However, when I modify the source of these commands, then the emulator
fails to start (as before). This is caused by the setpgid call via
preexec_fn in testing/mozbase/mozprocess/mozprocess/processhandler.py .
Passing ignore_children=True to ProcessHandler avoids the setpgid call
and allows the emulator to be used as expected on macOS.
The effect of not using setpgid is that the spawned process will not
be put in the process group of the "mach" Python script. This is not
a big deal. I can confirm that the emulator can still be killed by
quitting or force-quitting it, and did not experience other issues.
MozReview-Commit-ID: 4AKVqtwIoCj
--HG--
extra : rebase_source : df6615a32de666d0f9d4f27c1c6f462120364ee2
Following the move to use cargo worktrees in central, the .gitignore
file for mozversion is not used anymore since we no longer generate
testing/mozbase/rust/mozversion/target on building.
MozReview-Commit-ID: 72geBjNxjZl
--HG--
extra : rebase_source : d7f11b33c91407e97416344ca1a2d0f06aa573d3
In bug 1440714, mozdevice had its version bumped to 1.0.0, outside of the required
range in mozrunner's deps, causing in-tree breakage. Subsequently, I changed mozrunner's
dep list to allow for mozdevice 1.0.0, and released mozdevice 1.0.0 on pypi. Now I need
to update mozrunner on pypi with the updated deps, so require a mozrunner version bump.