Various updates to emulator command lines. Use -skip-adb-auth. Use -verbose
instead of trying to specify debug categories. Use more -memory and -cores
where applicable. Use -ranchu and -selinux permissive where applicable.
This moves the Rust crate mozrunner into central from GitHub.
The old repository will be graveyarded:
https://github.com/jgraham/rust_mozrunner
The git history is not considered important, hence this does not
overlay that onto central like we did for testing/geckodriver and
testing/webdriver.
MozReview-Commit-ID: J4ZYdow2Lkw
--HG--
extra : rebase_source : 1b499b708105a89a5fa3ae6ecac71c4946e20755
This marks **/docs/** as exclusively docs, and code that is autodoc'd as
inclusively docs.
That means that a change that purely modifies documentation files will *only*
run `docs` tasks, while a change that modifies autodoc'd source code will
*additionaly* run `docs` tasks. The tasks do not run by default.
MozReview-Commit-ID: G9tOK0AwtrI
--HG--
extra : rebase_source : 8dd971e5c9b0eb5f47895664a4ea49442f303ecb
extra : source : 0881de9b2b5e36ec37cc866f1d4af109da57a919
This enables the syntax like:
./mach try fuzzy dom/indexedDB
This will open up the fzf interface like normal, except only tasks
that have tests under dom/indexedDB will be selectable (and there
will only be one chunk per configuration).
This can be combined with -q/--query like normal:
./mach try fuzzy dom/indexedDB -q "!pgo !cov !asan"
When the tasks get scheduled, only the tests under the specified
path(s) will run within the harness.
MozReview-Commit-ID: IHRXXi5mB4G
--HG--
extra : rebase_source : 8a89f255591e6dfa31b1420196c4698f2015d10c
This moves the Rust crate mozversion into central from GitHub.
The old repository will be graveyarded:
https://github.com/jgraham/mozversion
The git history is not considered important, hence this does not
overlay that onto central like we did for testing/geckodriver and
testing/webdriver.
MozReview-Commit-ID: HeBggGmGsg6
--HG--
extra : rebase_source : 14f6943394bd7b6e8daa7a35b29bc209b7ac9ad4
This removes the subcommands for "./mach geckodriver", reverting
it back to have the meaning of running the geckodriver binary.
The build- and test commands are now integrated with mach, which
means you can run "./mach build testing/geckodriver" and "./mach
test testing/geckodriver" to run tests. This is backed by a new
top-level "./mach geckodriver-test" command, which we will not be
announcing.
MozReview-Commit-ID: CiQsfNqrvIp
--HG--
extra : rebase_source : 6c492b7e1128e4858e42ae4bb35ab4b29564dbeb
This makes several changes to make the 'mach' format cleaner and easier to
read. Some of the changes include:
* No longer print the 'action' no matter what. Printing the action for things
like 'log' or 'process_output' was redundant and caused verbosity. Now this
is done on a case by case basis (things like TEST-START/TEST-END will still
have their actions printed).
* Color coded the process id for 'process_output' actions. This is a dim cyan
to avoid conflicts with other actions.
* No longer quoting 'process_output' messages
* No longer printing thread information. In 99% of the case, this was just
dumping 'MainThread' over and over again. Perhaps printing this could be an
option on the formatter.
* Muted timestamps to help the important parts stand out better
* Colorized suite summary headings
* Unexpected statuses in _format_expected() are always red (never yellow).
This is to help make it stand out from all the other yellow text that gets
printed.
* Internal cleanup/refactoring
MozReview-Commit-ID: LAuYfqYkUPe
--HG--
extra : rebase_source : 6cab1bc3e38838f200f90acc2fff8dcad3d394f3
This makes several changes to make the 'mach' format cleaner and easier to
read. Some of the changes include:
* No longer print the 'action' no matter what. Printing the action for things
like 'log' or 'process_output' was redundant and caused verbosity. Now this
is done on a case by case basis (things like TEST-START/TEST-END will still
have their actions printed).
* Color coded the process id for 'process_output' actions. This is a dim cyan
to avoid conflicts with other actions.
* No longer quoting 'process_output' messages
* No longer printing thread information. In 99% of the case, this was just
dumping 'MainThread' over and over again. Perhaps printing this could be an
option on the formatter.
* Muted timestamps to help the important parts stand out better
* Colorized suite summary headings
* Unexpected statuses in _format_expected() are always red (never yellow).
This is to help make it stand out from all the other yellow text that gets
printed.
* Internal cleanup/refactoring
MozReview-Commit-ID: LAuYfqYkUPe
--HG--
extra : rebase_source : 41aa8651fc8d182bfcbd57c1d97b1bee437d478c
When 'summary_on_shutdown' is True (which is the case for |mach test| and
|mach mochitest|, the tbplformatter will now print an overall summary at
the end of the log run.
MozReview-Commit-ID: 9ieqJRcON8e
--HG--
extra : rebase_source : a27f6230c4d2daaa547e6fede24ba0c9ef55bfc0
When 'summary_on_shutdown' is True (which is the case for |mach test| and |mach
mochitest|), BaseSummaryFormatters will save the summary information until the
'shutdown' action is received at the end of the logger's lifetime.
Summary information will no longer be dumped on 'suite_end'.
MozReview-Commit-ID: HKtVr5PxfOy
--HG--
extra : rebase_source : f350f09111deb510b27a4e55797243dda3160869
The mach formatter gathers result counts and unexpected messages during the run
to be dumped in a summary at the end. This is a pattern we'd like to repeat in
several other formatters as well. Rather than re-implementing, this creates a
handler class that does nothing but store the data. Formatters can then choose
how to format this data and when to print it.
MozReview-Commit-ID: HKtVr5PxfOy
--HG--
extra : rebase_source : 22789db1b2fea1e44f47ef1aa9b22b21a6e8649c
It looks like the main cause of intermittent failures in getDirectory is
that the adb pull command fails because the emulator has hung. For other
commands, we usually handle this by checking the return code and raising
DMError if anything fails. There is mozharness/taskcluster code in
place to automatically retry tasks that throw DMError.
It looks like the main cause of intermittent failures in getDirectory is
that the adb pull command fails because the emulator has hung. For other
commands, we usually handle this by checking the return code and raising
DMError if anything fails. There is mozharness/taskcluster code in
place to automatically retry tasks that throw DMError.
Calling shutdown() causes two things to happen:
1) A 'shutdown' action is implicitly logged so handlers/formatters
can do things on log shutdown.
2) Further attempts to use the logger raises a LoggerShutdownError.
The shutdown() method is also implicitly called when exiting the context
manager.
MozReview-Commit-ID: LLNojVoCBZY
--HG--
extra : rebase_source : db483da27e82971ade4b8e424f14694fabd050f1
Calling shutdown() causes two things to happen:
1) A 'logger_shutdown' action is implicitly logged so handlers/formatters
can do things on log shutdown.
2) Further attempts to use the logger raise a LoggerShutdownError.
The shutdown() method is also implicitly called when the StructuredLogger's
destructor is run, or when exiting a context manager.
MozReview-Commit-ID: LLNojVoCBZY
--HG--
extra : rebase_source : 373b7e70f6a2121d29d7deccfe9bf4cc0f402e3b
This method has not a single caller and as such doesn't seem to
be necessary anymore.
MozReview-Commit-ID: qhNK3EBc6Q
--HG--
extra : rebase_source : 2978829739f0bc465f98b8f6b727c27a03a42b11
Reading the whole zip entry into memory is inefficient and can cause
OOMs if the entry is large enough. Let the ZipFile object choose the
most efficient extraction strategy instead.
The code in |mach test| for test resolving, should get merged with the TestResolver
class in moztest.resolve. This way it can be shared with other modules and we'll
have a single canonical place for all our test resolving logic.
MozReview-Commit-ID: IHRXXi5mB4G
--HG--
extra : rebase_source : 6f96d06412ab8fa152ac5d9bdd15acbcdc9695c4
The TestMetadata and TestResolver classes aren't technically part of the build
system. The only connection is that they consume some build system output.
The next patch in this series is going to be merging in a bunch of other test
resolving logic from other parts of the tree. Moving this out first allows us
to keep that extra logic out of mozbuild.
MozReview-Commit-ID: 1eq4SjFVCyW
--HG--
rename : python/mozbuild/mozbuild/test/test_testing.py => testing/mozbase/moztest/tests/test_resolve.py
extra : rebase_source : 7ff11f9ec455547533082d20cb5371845f7a4f21
Variable appDir was being referenced before assignment. Changed the try-except-finally blocks to handle the error.
MozReview-Commit-ID: AHEeVhmPfQI
--HG--
extra : rebase_source : b0dd78f3895bb34c4e916bc0441dd9ae5e643dfc
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 fixes an exception when a test_status/test_end is logged before a
suite_start. This case should be an error anyway, but might as well fix this to
keep the logs looking clean.
MozReview-Commit-ID: 2TlWlSmczwH
--HG--
extra : rebase_source : c33aed0870d7b7fa51d855383d6336331d4f22fc
This just adds two basic tests, one for a passing test and another for a
failing one. In mochitest, we use privileged APIs to also tests crashes,
assertions, asan and leaks. But these APIs aren't available to reftests
so I'm not sure how we can test these things.
I figure it's not worth holding the framework up on this though, I'll file
a follow-up to figure out something to do for that.
MozReview-Commit-ID: 59TSbsugT5T
--HG--
extra : rebase_source : 72ecd817017c8b7d55eab879db4f6ad5fecc54c0
This includes code for downloading a Firefox binary, downloading + setting up a tests.zip and
running output through mozharness' output parsers. This is all stuff that will also be required
for the reftest selftests.
I couldn't think of a better location to put this stuff, suggestions welcome.
MozReview-Commit-ID: 59TSbsugT5T
--HG--
extra : rebase_source : a328f6bc90e73fe23f9054933cd01a30065419f6
dm.killProcess correctly tries to use 'am force-stop' in preference to kill()
to end a process. But some clients of killProcess specify a kill signal and
use killProcess for purposes other than endding the process, for example, to trigger
crash dumps. To allow for these cases, it is better to not use force-stop when a
signal is specified.
This switches most tests over to use pytest as the runner instead of unittest (taking
advantage of the fact that pytest can run unittest based tests).
There were a couple tests that had failures when swithing to pytest:
config/tests/unit-expandlibs.py
xpcom/idl-parser/xpidl/runtests.py
For these tests, I added a runwith='unittest' argument so that they still run the
same way as before. Once we fix them to use pytest, the unittest logic in mozunit.py
can be deleted.
MozReview-Commit-ID: Gcsz6z8MeOi
--HG--
extra : rebase_source : 3c762422ce0af54cbbe7d9fc20085a2d1ebe7057
The poll() call in SystemResourceMonitor.stop might fail even though
there is something to read from the pipe, in some corner cases, and
python won't let us know about it. In that case, an exception is thrown,
leaving the SystemResourceMonitor (and its callers) in a weird state. In
practice, this leads BuildMonitor.__exit__ to recall stop, which then
fails.
So when poll() throws an exception, we pretend there's still something
to read, and we try to read anyways. If there is something to read,
recv() will return it, otherwise, it will throw an exception of its own,
which we catch, pretending we're done.
Furthermore, when there is nothing to read from the pipe, poll() simply
returns False, and our loop never sets `done` to True, and we then hit
an assert, which doesn't have its place here, so we remove it.
Finally, the other end of the pipe might have died at any time, making
sending over the pipe fail, so we also protect against that.
With all these changes, it feels like the reason to backout bug 1239939
in bug 1272782 should have been dealt with, and we can drop the timeout
again.
--HG--
extra : rebase_source : ac72dd5b2602cf3ffddfb429f95e02380f939893