Commit Graph

1155 Commits

Author SHA1 Message Date
Henrik Skupin
10c59cca93 Bug 1451319 - Unset MINIDUMP_SAVE_PATH for mozcrash unit tests. r=davehunt
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.

MozReview-Commit-ID: 6JNnRZGlOj3

--HG--
extra : rebase_source : a139221b810e1b38082d5676b67583269802b7e9
2018-04-05 11:53:43 +02:00
Tiberius Oros
784748948c Backed out changeset aecbdcadaf96 (bug 1451319) for linting opt failures /builds/worker/checkouts/gecko/testing/mozbase/mozcrash/tests/conftest.py:90 on a CLOSED TREE
--HG--
extra : amend_source : 35e120af14725c1cc045f729e0d5b36fab2a1cfd
2018-04-05 14:53:07 +03:00
Henrik Skupin
8effc5360b Bug 1451319 - Unset MINIDUMP_SAVE_PATH for mozcrash unit tests. r=davehunt
The build job on Windows sets the MINIDUMP_SAVE_PATH env variable,
and because it isn't unset mozcrash copies all created minidump
files from unittests to the "public/build" folder, which then
get uploaded as artifacts.

MozReview-Commit-ID: 6JNnRZGlOj3

--HG--
extra : rebase_source : c148e5a8ac4439ca0f4e66ee649b45ceb7b1bc60
2018-04-05 11:53:43 +02:00
Henrik Skupin
4c98f9ad50 Bug 1451310 - [mozrunner] Catch exceptions when starting the client process. r=ahal
If a ProcessHandler instance has been created, but mozprocess fails
to start the child process, a dangling process_handler instance is
attached to the runner instance. This should be avoided, and a
RunnerNotStartedError has to be thrown.

MozReview-Commit-ID: LgNFVaT9qVs

--HG--
extra : rebase_source : c06aef08d7619ac9d3fe94ad29bdae06f0f79364
2018-04-04 15:04:42 +02:00
Henrik Skupin
14f784eac8 Bug 1451246 - [mozrunner] Always encode key and value of env variables as UTF-8 if those are of unicode type. r=gbrown
Without encoding the key and value of environment variables as UTF-8
for non-interactive sessions "subprocess.Popen()" and specifically
"os.execvpe()" will fail.

MozReview-Commit-ID: 9lO562XnDZx

--HG--
extra : rebase_source : bba542648b6050d0e9f628c95b658c3a546d2b5d
2018-04-04 10:36:58 +02:00
Andreas Tolfsen
2efb6af857 Bug 1448900 - Release mozrunner 0.6.1. r=whimboo
One change since 0.6.0, which is a regression fix for a fallout
from bug 1443853.

MozReview-Commit-ID: 56GbEV4HM4v

--HG--
extra : rebase_source : 0e14fa63f00f1661cae01a10c76c2813d349ba1b
2018-03-28 17:28:29 +01:00
Andreas Tolfsen
73c11c00a8 Bug 1448900 - Avoid killing exited process. r=jgraham,whimboo
std::process::Child::kill() will return Err if the process has
already exited.  The assumption in bug 1443853 was that calling
::kill() would consistently return the std::process::ExitStatus
was the process already dead.

This patches the regression from bug 1443853 by employing
Child::try_wait() in a loop.  When the process gives some exit status,
this is return directly without relying on Child::kill() as before.

If the process has not exited and the timeout has elapsed, we kill
the process and return its return value.  If the process has not
exited but the timeout duration has not elapsed, we wait 100 ms as before.

MozReview-Commit-ID: 4VENbrKtcEh

--HG--
extra : rebase_source : 7f27ed057da740306367ef2b6a87f8ac6a242541
2018-03-28 17:17:29 +01:00
Geoff Brown
b4dddb3c35 Bug 1440719 - Set MOZ_CRASHREPORTER_SHUTDOWN during tests, other than browser-chrome and non-e10s; r=ted 2018-03-28 12:43:52 -06:00
Kris Maglione
7d75136f52 Bug 1448221: Part 3 - Remove startup staging directory scan. r=aswan
MozReview-Commit-ID: JHA1umCQS2D

--HG--
extra : rebase_source : d360aeb165bdac1122ff27b1ea561146e48f16e7
2018-03-26 16:09:52 -07:00
Andrew Halberstadt
c30792183c Bug 1445624 - [mozlog] Various improvements and fixes to the mach formatter, r=gbrown
This consolidates the printing of status logs, which was previously handled
differently in 3-4 places. This also fixes a few of the annoyances listed in
the bug 1445624 description. Finally this also fixes a few edge cases that I
noticed when writing the tests.

MozReview-Commit-ID: APudT8yBqVS

--HG--
extra : rebase_source : 943a71c762dd27a7f7ebea86d467e81a0b27d400
extra : source : 61ba86fc1366a62a429a7daab7d6b1c198c69593
2018-03-19 11:55:39 -04:00
Andrew Halberstadt
4d112dbe6e Bug 1445624 - [mozlog] Add some tests for the mach formatter, r=gbrown
This adds a basic test for the mach formatter. This will ensure that changes to
this format are intentional. It will also make it easier for reviewers of these
changes to see a diff of the old vs new format.

MozReview-Commit-ID: LBSfdyvOPVV

--HG--
extra : rebase_source : 5529ad1f03306dcf867d88af579b69d6005091c0
2018-03-19 11:55:31 -04:00
arthur.iakab
5e8092339a Merge mozilla-central to inbound
--HG--
rename : browser/base/content/test/general/bug364677-data.xml => browser/components/feeds/test/bug364677-data.xml
rename : browser/base/content/test/general/bug364677-data.xml^headers^ => browser/components/feeds/test/bug364677-data.xml^headers^
rename : browser/base/content/test/general/test_bug364677.html => browser/components/feeds/test/test_bug364677.html
rename : services/sync/tps/extensions/tps/bootstrap.js => services/sync/tps/extensions/tps/components/tps-cmdline.js
rename : testing/talos/talos/pageloader/bootstrap.js => testing/talos/talos/pageloader/components/tp-cmdline.js
rename : testing/talos/talos/startup_test/sessionrestore/addon/bootstrap.js => testing/talos/talos/startup_test/sessionrestore/addon/SessionRestoreTalosTest.js
rename : testing/talos/talos/talos-powers/bootstrap.js => testing/talos/talos/talos-powers/components/TalosPowersService.js
rename : tools/quitter/bootstrap.js => tools/quitter/QuitterObserver.js
extra : rebase_source : 5801e95a945b54754f27571e7b211e1eac132d67
2018-03-21 22:27:21 +02:00
arthur.iakab
abcb47d8cc Merge inbound to mozilla-central. a=merge 2018-03-21 21:13:11 +02:00
Henrik Skupin
1983e0ddd6 Bug 1441287 - [mozcrash] Add support for unicode paths. r=ahal
To let mozcrash handle minidump files located in profile paths
with unicode characters, support for that has to be added. It
also applies to the locations for the stackwalk binary, minidump
save path, and symbols.

MozReview-Commit-ID: EROVmK21a5Y

--HG--
extra : rebase_source : 67092e6164eb0e46decd24b2da1490ffefb4d5d7
2018-03-20 11:54:04 +01:00
Henrik Skupin
8152b5a69d Bug 1441287 - [mozcrash] Convert unit tests to pytest. r=ahal
Switch to the pytest framework to benefit from its rich
feature set for creating Python test.

MozReview-Commit-ID: AoptjhT1Hln

--HG--
extra : rebase_source : a0870e54038697f08cf14e7babffdb014a7a3c7d
2018-03-19 14:37:31 +01:00
Henrik Skupin
ba18be73fc Bug 1441287 - [mozcrash] check_for_crashes should always return count of crashes. r=ahal
Right now if no minidump file is present in the minidump folder,
the check_for_crashes method returns False. Whereby in all other
cases the number of crashes is returned.

To be consistent this method should always return a number, and
in case of no minidumps it should be 0.

MozReview-Commit-ID: 3DTgxn41TVn

--HG--
extra : rebase_source : 1631313878b596607ede27ebb04f95a64e2f9e2e
2018-03-20 13:44:56 +01:00
Henrik Skupin
cecdc45b6f Bug 1441287 - [mozcrash] Refactor unit tests. r=ahal
Split single unit test module into different modules separated
by area of test coverage.

MozReview-Commit-ID: Blh8V46kDq1

--HG--
extra : rebase_source : 64bfa620286904fdb2bde114efb337d0dd5d42b7
2018-03-13 15:14:49 +01:00
Andrew Halberstadt
c252fe40f7 Bug 1447401 - [mozrunner] Remove b2g related runners and devices, r=jmaher
MozReview-Commit-ID: 4TYYSoviSEy

--HG--
extra : rebase_source : a6fd7356ad4c320c00c1f9ddad9b3924086c4954
2018-03-20 10:43:39 -04:00
Noemi Erli
e2ccf77a14 Backed out 10 changesets (bug 1446809) for failures in testing/mozbase/moztest/tests/test.py on a CLOSED TREE
Backed out changeset 5748f214f813 (bug 1446809)
Backed out changeset 1c7a6f2885fb (bug 1446809)
Backed out changeset 2c31f0efbe64 (bug 1446809)
Backed out changeset e102f93c590f (bug 1446809)
Backed out changeset c722a1c3395f (bug 1446809)
Backed out changeset 20b4c87f8abb (bug 1446809)
Backed out changeset 31026393c5b6 (bug 1446809)
Backed out changeset 9103be0ca176 (bug 1446809)
Backed out changeset 11d671ad8ed4 (bug 1446809)
Backed out changeset e412991e7f95 (bug 1446809)
2018-03-20 17:00:04 +02:00
Sylvestre Ledru
d7d0839614 Bug 1446809 - Remove some b2g leftover in the testing/mozbase r=jgraham
MozReview-Commit-ID: 6PGuSXVjMB9

--HG--
extra : rebase_source : daf2f4e824dd700efa50d5f67430bfb47a5853b5
2018-03-18 19:28:26 +01:00
Andrew Halberstadt
246d6dddec Bug 1444152 - [test] Fix regression running marionette tests with |mach test|, r=whimboo
There were two issues:
1) The mach command name in resolve.py was wrong.
2) The marionette harness uses deepcopy on the passed in kwargs and sometimes
the 'log' argument that testing/mach_commands.py was passing in can be a class
instance (which can't be deepcopied).

MozReview-Commit-ID: 5gPxuiHs3dY

--HG--
extra : rebase_source : 63bc9c84fdcb540862f1dcbc2654bf5729e0dec8
2018-03-13 09:49:09 -04:00
Sylvestre Ledru
debb1617bd Bug 1446809 - Remove some b2g leftover in the testing/mozbase r=jgraham
MozReview-Commit-ID: 6PGuSXVjMB9

--HG--
extra : rebase_source : 69d3611477d78fcd7ba6db6baff1803281244ac0
extra : source : 04c46f107d24bc387a98839c86a22aec9ad31721
2018-03-20 21:20:26 +01:00
Geoff Brown
d22a877f24 Bug 1444421 - Restore some mozdevice documentation; r=bc
This was accidentally deleted in bug 1340584.
2018-03-21 13:54:27 -06:00
Geoff Brown
e2c5753929 Bug 1440714 - Convert Android cppunit test harness to adb.py; r=bc 2018-03-16 09:37:48 -06:00
Geoff Brown
b2a1ec39be Bug 1440714 - Convert rungeckoview to adb.py; r=bc 2018-03-16 09:37:48 -06:00
Geoff Brown
30995fa955 Bug 1440714 - Remove devicemanager code from mozversion; r=bc
Remove RemoteB2GVersion from mozversion and associated parameters from
mozversion.get_version(). Other than the cli interface modified here,
there are no in-tree clients of get_version() using the remote parameters.
2018-03-16 09:37:48 -06:00
Geoff Brown
b484e85fee Bug 1445940 - fix adb_android.py detection of bool extras in launch_application, r=bc
Originally landed on autophone github in bug 1401617.
2018-03-15 10:57:48 -06:00
Geoff Brown
d8fdaf351c Bug 1445940 - adb_android.py - use activity name org.mozilla.gecko.BrowserApp when launching Fennec, r=nalexander
Originally landed on autophone github in bug 1237755.
2018-03-15 10:57:48 -06:00
Sylvestre Ledru
06b7836c7e Bug 1444628 - Fix a bunch of typo in the doc r=ahal
MozReview-Commit-ID: SNXsViVUm0

--HG--
extra : rebase_source : d1a73dd5399854c0ec28087b207bb1b1d4bb9c02
2018-03-10 17:14:38 +01:00
Andreas Tolfsen
6b09cf8df1 Bug 1401129 - Release mozrunner 0.6.0. r=whimboo
MozReview-Commit-ID: 2nljPi3HN5b

--HG--
extra : rebase_source : 7e1cd2201937b5bb47fe81bcdbd6c1bc068b92b5
2018-03-08 14:26:10 +00:00
Andreas Tolfsen
7b875989b2 Bug 1401129 - Release mozversion 0.1.3. r=whimboo
MozReview-Commit-ID: JMUOjttq31L

--HG--
extra : rebase_source : 188ea63b2a3aff99562df94bb7c4a9e164cfea54
2018-03-12 11:48:18 +00:00
Andreas Tolfsen
98cdaaee72 Bug 1443853 - Move browser process shutdown monitor to mozrunner. r=jgraham
This moves the shutdown monitor for the Firefox process from
geckodriver to mozrunner, which is a more suitable home for it.
We will likely need specialised versions of this in the future with
products such as GeckoView and Fennec.

In addition to the move it also cleans up the polling loop by
employing std::time::SystemTime which lets us match on the elapsed
time since its construction.  This seems nicer than having to perform
division operations on integers, which in Rust are inherently unsafe
(there is no guard against SIGFPE).

This change should be functionally equivalent to the existing code.

MozReview-Commit-ID: 1asnFbixhcY

--HG--
extra : rebase_source : f21f734862bfbbc1ed665dc9c9f611c5968d662f
2018-03-07 21:57:53 +00:00
Andreas Tolfsen
1509c2ba22 Bug 1443853 - Rename RunnerProcess::status() to ::try_wait(). r=jgraham
This renames RunnerProcess::status() to ::try_wait() for symmetry
with std::process::Child::try_wait() in the standard library.

The patch also makes an attempt at cleaning up its usage in geckodriver,
however this can be further improved.

MozReview-Commit-ID: 14ihT7MpM7l

--HG--
extra : rebase_source : 4e96c79c6ebbb256c4a08cb4dd86c99aacaa13ac
2018-03-07 21:43:49 +00:00
Andreas Tolfsen
f57be4355e Bug 1443853 - Avoid std::io::{Result,Error} renaming. r=jgraham
We can pick up std::io::Result and std::io::Error directly from
the std::io namespace without having to rename them.

MozReview-Commit-ID: 9Xz92HvcFpO

--HG--
extra : rebase_source : 89a006c40e11d9e7fc5706d3a6612f916e00f919
2018-03-07 21:31:31 +00:00
Andreas Tolfsen
a1615d76ac Bug 1443853 - Rename RunnerProcess::stop() to ::kill(). r=jgraham
This renames RunnerProcess::stop() to ::kill() for symmetry with
the standard library's std::process::Child.

MozReview-Commit-ID: 20vSni9bA0X

--HG--
extra : rebase_source : 112b29249563154b50d9a72c141034e5cdf7f19b
2018-03-07 21:29:23 +00:00
Andreas Tolfsen
ecbbc100b2 Bug 1443853 - Rename RunnerProcess::is_running() to ::running(). r=jgraham
The ideom for getters in Rust is to not prefix them with "is_".
Setters should, however, have the "set_" prefix.

MozReview-Commit-ID: 9kXHBYGK7aL

--HG--
extra : rebase_source : 6c2591771646c8b7c5b0e6b1af5427455938b4cf
2018-03-07 21:23:57 +00:00
Andreas Tolfsen
8e428fe6bb Bug 1443853 - Drop unused std::ascii::AsciiExt trait. r=jgraham
Silences another compiler warning.

MozReview-Commit-ID: 6Bcw7Ej9uIC

--HG--
extra : rebase_source : 4f6d8522434fed7e673b71d028dce53753f4a3e5
2018-03-07 21:27:18 +00:00
Geoff Brown
6a32698d7b Bug 1440714 - Add ADBDevice.get_file() to pull and read a remote file; r=bc 2018-03-09 09:27:08 -07:00
Geoff Brown
302c5c717b Bug 1440714 - Add ADBAndroid.get_top_activity() to determine the focused app; r=bc 2018-03-09 09:27:08 -07:00
Geoff Brown
336d7b09b0 Bug 1440714 - Add -r option to ADBAndroid.install_app(); r=bc 2018-03-09 09:27:08 -07:00
Noemi Erli
5d87ef4db3 Backed out changeset 1383d36fdabf (bug 1440719) for mochitests failures @ js::ctypes::ConvertToJS on a CLOSED TREE 2018-03-07 23:16:30 +02:00
Geoff Brown
7ec2464f37 Bug 1440719 - Set MOZ_CRASHREPORTER_SHUTDOWN during tests, other than browser-chrome; r=ted 2018-03-07 10:18:40 -07:00
Henrik Skupin
f5e866d199 Bug 1438679 - [mozrunner] DeviceRunner has to override returncode and wait() to check for remote process status. r=gbrown
Without returncode and wait() being overridden the default
implementation of the Runner class takes precedence and will
run the check for the adb command but not the remote process.
This always returns 0 because adb runs or forks itself as daemon.

Instead the remote process has to be checked for existence.

MozReview-Commit-ID: GvuAaMSxBT2

--HG--
extra : rebase_source : e84b52fdc9ce48617102650d6d0ae73e90899538
2018-02-22 23:08:49 +01:00
Mike Pennisi
fb163fbacb Bug 1439411 - [mozlog] Document built-in CLI logging options r=jgraham
The output formatters provided by mozlog are well-documented in the
online help guide, but this information is not available to users in the
CLI. The `add_logging_group` method extends the consuming project's
command-line interface without referencing mozlog itself. This means
consumers may not have a means to discover the additional information,
and even in cases where they can infer this connection, there is no
indication of the stability of the behavior.

Extend the description of the built-in output formatters to explain
their origin and reference the relevant documentation.

--HG--
extra : histedit_source : 9069af86efc67232e059176f99a877c513644ce2
2018-02-26 08:29:00 +02:00
Andrew Halberstadt
adbe589f59 Bug 1353461 - [manifestparser] Implement a chunk_by_manifest algorithm, r=jmaher
This implements a chunk_by_manifest algorithm. It is similar to chunk_by_slice
in that it tries to make an even number of tests run in each chunk. However,
unlike chunk_by_slice it will guarantee that tests in the same manifest will
all run in the same chunk. This makes it suitable to use with run-by-manifest.

This means the chunks won't be perfect (as manifests are differnet sizes). It
is also prone to more randomization, similar to chunk-by-runtime.

In fact, this algorithm is nearly identical to the chunk-by-runtime one, so it
was refactored out to a base class.

MozReview-Commit-ID: HI2ByxW0i8V

--HG--
extra : rebase_source : e066c034b85222d26bafe6873a80366d5bd9df9e
2018-02-13 15:16:37 -05:00
James Willcox
a47a1c6678 Bug 1291387 - Make mochitest and reftest work against TestRunnerActivity r=gbrown,jchen
Pass --appname org.mozilla.geckoview.test to 'mach mochitest' or
'mach reftest'. This runs the tests without e10s currently.

MozReview-Commit-ID: 7TIvA3zRCw2
2018-02-22 09:18:37 -06:00
Ciure Andrei
040171056c Backed out changeset 25a1c4b0e2af (bug 1439411) for linting failure. a= backout on a CLOSED TREE 2018-02-20 13:45:08 +02:00
Mike Pennisi
4f6234b136 Bug 1439411 - [mozlog] Document built-in CLI logging options r=jgraham
The output formatters provided by mozlog are well-documented in the
online help guide, but this information is not available to users in the
CLI. The `add_logging_group` method extends the consuming project's
command-line interface without referencing mozlog itself. This means
consumers may not have a means to discover the additional information,
and even in cases where they can infer this connection, there is no
indication of the stability of the behavior.

Extend the description of the built-in output formatters to explain
their origin and reference the relevant documentation.

--HG--
extra : rebase_source : 5e7420f8d1589dccc335b0a48c8967d4928f959f
2018-02-19 11:58:00 +02:00
Andreas Tolfsen
86adc06b32 Bug 1439331 - Upgrade mozrunner log dependency to 0.4. r=jgraham
MozReview-Commit-ID: 96rHwvsIEik

--HG--
extra : rebase_source : 8dc84880d8b1f9cba778c55dabb1cfd2cd31257f
2018-02-19 12:46:53 +01:00
Andrew Halberstadt
794955920a Bug 1437912 - [moztest] Add some missing subsuite definitions, r=gbrown
Since we're adding specific 'task_regexes' for each new suite definition,
this will allow us to schedule tests of these subsuites with
|mach try fuzzy <path>|.

MozReview-Commit-ID: 2mDSneV95lG

--HG--
extra : rebase_source : 467b9d885e92c1c855ed547f2a7496b1062f2dc2
2018-02-16 09:35:25 -05:00