Commit Graph

593 Commits

Author SHA1 Message Date
Geoff Brown
534483c227 Bug 1177545 - Remove automation.py.in entirely; r=egao,bc
Remove the remainder of automation.py.in and the build support for generating
automation.py.
Some of this functionality was in use, especially for android tests.
Some code was moved or re-implemented in remoteautomation.py or in the affected
harness(es). Some features were removed: There are some minor changes in behavior.
For instance, instead of using a different server startup timeout for debug builds,
one value is used for all builds (due to performance improvements over time,
the longer timeout is no longer needed).

Differential Revision: https://phabricator.services.mozilla.com/D66839

--HG--
extra : moz-landing-system : lando
2020-03-17 19:06:34 +00:00
Geoff Brown
313e12e535 Bug 1177545 - Cleanup automation.py.in; r=egao
Remove unused code from automation.py.in, move some android-specific code from
automation.py.in to remoteautomation.py, and eliminate some other easily-replaced
code. In the long term we want to eliminate automation.py.in completely; I may
attempt that once these changes have landed.

Differential Revision: https://phabricator.services.mozilla.com/D66306

--HG--
extra : moz-landing-system : lando
2020-03-10 21:42:26 +00:00
Geoff Brown
3161788df7 Bug 1603499 - Report java exceptions from minidump .extra files; r=bc
Stop using mozcrash.check_for_java_exception(), which scans logcat for uncaught
exceptions. Instead, check for java_stack in the extra dump information during
normal crash reporting; if java_stack is present, display the java exception and
stack instead of dumping a full native crash report.

Differential Revision: https://phabricator.services.mozilla.com/D61836

--HG--
extra : moz-landing-system : lando
2020-02-07 16:05:52 +00:00
Geoff Brown
253aaf1570 Bug 1599587 - Adjust android mochitest/reftest logging; r=jmaher
Guard against flaky results from the remote is_file and reduce adb traffic
by waiting once for the log file to be created rather than checking for it
throughout the test run.
(Minor ride-along change to reftest.jsm resolves javascript error introduced
by bug 1575266.)

Differential Revision: https://phabricator.services.mozilla.com/D55026

--HG--
extra : moz-landing-system : lando
2019-11-27 21:33:38 +00:00
Geoff Brown
4286faeb7b Bug 1590354 - Remove checks for remote minidumps directory; r=jmaher
Whereas:
 - desktop tests don't make this check;
 - the check for directory existence has been troublesome and almost never useful;
 - bug classification of this condition has been troublesome;
 - if a startup crash actually did occur before crashreporter init, there would still be an indication in logcat and possibly a tombstone, and the "No test summary found" check would definitely be triggered;
Let's stop checking for minidumps directory creation.

Differential Revision: https://phabricator.services.mozilla.com/D54755

--HG--
extra : moz-landing-system : lando
2019-11-26 16:38:44 +00:00
Marian Raiciof
b2b633e095 Bug 1526752 - [mozdevice] Update adb.py and other necessary files to support python3 r=ahal,davehunt
Improve support for Python 3 by running modernize over adb.py and a few other related changes.

Differential Revision: https://phabricator.services.mozilla.com/D19306

--HG--
extra : moz-landing-system : lando
2019-06-07 08:44:15 +00:00
Bob Clary
2a1c46386f Bug 1559103 - RemoteAutomation should call parent class init first, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D34856

--HG--
extra : moz-landing-system : lando
2019-06-13 13:54:18 +00:00
Geoff Brown
fe297ae528 Bug 1539603 - Remove obsolete references to MediaPipelineFactory logging; r=jmaher
Other than the MediaPipelineFactory references, nothing else is obsolete, so this is a
very minor cleanup, just to improve readability a bit.

Differential Revision: https://phabricator.services.mozilla.com/D25124

--HG--
extra : moz-landing-system : lando
2019-03-28 00:13:48 +00:00
Geoff Brown
a908bb5504 Bug 1531611 - Check for ANR and tombstone files in all android tests; r=bc
The existing ANR and tombstone checks in remoteautomation are used
by mochitests and reftests but are awkward for other harnesses like cppunit
that do not use remoteautomation...and easily missed. This patch moves that
code to the mozharness AndroidMixin, treating ANRs and tombstones like the
logcat: Make sure any old logs are deleted when the mozharness script starts,
then move any logs found at the end of the run to the upload directory.
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1%2C2%2C3&revision=f3de1e9836da2b0c9232f5d92c751b979459e19b
demonstrates tombstone artifacts for the Android 7.0 cppunit tests.

Differential Revision: https://phabricator.services.mozilla.com/D21774

--HG--
extra : moz-landing-system : lando
2019-03-05 14:22:45 +00:00
Geoff Brown
308d1fcb22 Bug 1517169 - Ensure Android remote test log is deleted before launching test app; r=bc 2019-01-02 09:50:36 -07:00
Geoff Brown
27c0a1415f Bug 1507207 - Improve support for e10s mode testing on Android; r=bc 2018-11-27 09:41:13 -07:00
Geoff Brown
fa50b896b4 Bug 1509534 - Simplify Android runApp; r=bc 2018-11-27 09:41:12 -07:00
Geoff Brown
a6aa854ab5 Bug 1503587 - Check for and kill errant crashreporter after Android browser tests; r=bc 2018-10-31 17:23:47 -06:00
Bob Clary
129bad1f48 Bug 1482887 - Remote automation should kill already running instances rather than dying, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
fbd6d3dfca Bug 1482878 - Use screencap to capture on physical android device screenshots, r=gbrown. 2018-08-18 10:47:12 -07:00
Bob Clary
be2ccf78f3 Bug 1482874 - Handle Android 8.1 change for anr stack directory to contain individual files for traces, r=gbrown. 2018-08-18 10:47:12 -07:00
Geoff Brown
8b4653a7b7 Bug 1480546 - Enhance logging for Android automation app wait; r=bc 2018-08-07 10:05:37 -06:00
Bob Clary
745c5ff6c2 Bug 1477807 - Distinguish ADBTimeoutErrors from other exceptions in Android remote tests, r=gbrown. 2018-07-27 08:27:16 -07:00
Geoff Brown
bea4bee944 Bug 1472032 - Increase Android browser time-out to 110 minutes; r=me,a=test-only
This time-out has traditionally been 90 minutes. It mustn't exceed the 120 minute
task time-out for android browser tests. Let's try 110 minutes.
2018-06-29 16:05:58 -06:00
Geoff Brown
4d05f461aa Bug 1464866 - Fix a typo in Android time-out message; r=me,a=test-only 2018-05-28 11:29:34 -06:00
Sylvestre Ledru
dcfef841a7 bug 1463425 - Fix flake8/pep8 issue by hand in build/ r=gps
MozReview-Commit-ID: AZdcEWyVV6e

--HG--
extra : rebase_source : b1c45028c8d46be5ba590a27a2f9f20e248a26b1
2018-05-21 23:58:19 +02:00
Sylvestre Ledru
8cd16bb55b bug 1463425 - autopep8 on build/ r=gps
MozReview-Commit-ID: ETzx4HsjbEF

--HG--
extra : rebase_source : 7e27a4cfe2bb358d513a18a33c245bcc6d559c46
2018-05-21 23:56:34 +02:00
Geoff Brown
3680684f70 Bug 1452694 - Use TestRunnerActivity for geckoview mochitest/reftest; r=bc
This makes the changes necessary to use TestRunnerActivity when geckoview
is installed and requested, but we do not yet attempt to run any such
test tasks in automation.
2018-04-10 13:26:11 -06: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
Geoff Brown
cf1401dff9 Bug 1448697 - Try to use force-stop instead of kill to end remote applications; r=bc
This is important for running browser tests on some non-privileged devices, where
kill may not be permitted.
2018-03-26 12:21:46 -06:00
Geoff Brown
6083932cff Bug 1440714 - Convert Android browser test harnesses to adb.py; r=bc
This affects Android robocop, mochitest (all flavors) and reftests (all flavors).
2018-03-23 18:06:27 -06:00
Geoff Brown
385ab244a3 Bug 1440674 - Simplify some code in remoteautomation.py; r=jmaher
remove RemoteAutomation._product and product options;
remove some unused code paths;
remove "blobber" references;
remove incorrect and/or unhelpful comments;
s/_devicemanager/_dm/ (shorter, improve readability)
2018-02-23 09:47:57 -07:00
Geoff Brown
0531bf800b Bug 1436262 - Improve efficiency of detection of end of test Android test runs; r=jmaher
Once a test summary is seen, check for application completion more often,
so that we can complete the test run sooner.
2018-02-07 13:33:44 -07:00
Geoff Brown
8b8a2994e8 Bug 1435433 - Print master test summary after android mochitests when runByManifest; r=jmaher 2018-02-07 13:33:43 -07:00
Mike Hommey
2b2a874b47 Bug 1420355 - Statically link DMD. r=njn
--HG--
extra : rebase_source : 8e7cf975d096116b666532f3fe8aa5a7f61b5725
2017-11-28 08:10:48 +09:00
Csoregi Natalia
4ce8d0124c Backed out 7 changesets (bug 1420355) for mass failures on OS X and Android. r=backout on a CLOSED TREE
Backed out changeset a7ed89e13a4c (bug 1420355)
Backed out changeset fd6702e6e0a0 (bug 1420355)
Backed out changeset 0479dda078a2 (bug 1420355)
Backed out changeset e69357ccca9e (bug 1420355)
Backed out changeset 3742a4b69ba2 (bug 1420355)
Backed out changeset 451cd087922f (bug 1420355)
Backed out changeset d80b5c4e1dd0 (bug 1420355)
2017-11-29 03:08:46 +02:00
Mike Hommey
7c62087a43 Bug 1420355 - Statically link DMD. r=njn
--HG--
extra : rebase_source : 46800c9c0c5006a5a32f11abc209da27e65ae0f5
2017-11-28 08:10:48 +09:00
John Lin
93c62b59f7 Bug 1417006 - remove tombstone files but keep the directory. r=dminor
MozReview-Commit-ID: Ds87KZ47vf1

--HG--
extra : rebase_source : 0578a58107b39abb546758cd8aa21c89e7b4b81f
2017-11-13 16:10:35 +08:00
Geoff Brown
b6387e7f30 Bug 1412297 - Retry devicemanager getTopActivity once; r=jmaher
getTopActivity calls 'adb shell dumpsys window windows' which intermittently
times out. Instead of ending the test run when that happens, let's try
again, in hopes of recovering. If recovery fails and the browser is
subsequently found running, log an explanation before killing it.
2017-10-31 15:58:31 -06:00
Geoff Brown
3c8e31bdb7 Bug 1402347 - Be more exact in Android tests when checking run time; r=jmaher 2017-09-22 11:32:38 -06:00
Christian Holler
b8ee76ebd8 Bug 1373256 - Changes to support -fsanitize=integer in the codebase. r=froydnj
The -fsanitize=integer analysis from UBSan can be helpful to detect signed and unsigned integer overflows in the codebase. Unfortunately, those occur very frequently, making it impossible to test anything with it without the use of a huge blacklist. This patch includes a blacklist that is broad enough to silence everything that would drain performance too much. But even with this blacklist, neither tests nor fuzzing is "clean". We can however in the future combine this with static analysis to limit ourselves to interesting places to look at, or improve the dynamic analysis to omit typical benign overflows.

It also adds another attribute that can be used on functions. It is not used right now because it was initially easier to add things to the compile-time blacklist to get started.

Finally, it includes a runtime suppression list and patches various parts in the test harnesses to support that. It is currently empty and it should not be used on frequent overflows because it is expensive. However, it has the advantage that it can be used to differentiate between signed and unsigned overflows while the compile-time blacklist cannot do that. So it can be used to e.g. silence unsigned integer overflows on a file or function while still reporting signed issues. We can also use this suppression list for any other UBSan related suppressions, should we ever want to use other features from that sanitizer.

MozReview-Commit-ID: C5ofhfJdpCS

--HG--
extra : rebase_source : 952043a441b41b2f58ec4abc51ac15fa71fc142f
2017-04-09 12:59:26 +02:00
Geoff Brown
df122d5bfa Bug 1340584 - Remove devicemanagerSUT and references to sutagent; r=wlach
sutagent is no longer built or used; devicemanagerSUT is completely
unused. After this change, devicemanagerADB is the only implementation of
devicemanager, and test harness options like --dm_trans are eliminated.
2017-03-21 12:20:01 -06:00
Andrew Halberstadt
79791a2cff Bug 1330772 - Remove all b2g related code from reftests, r=jmaher
MozReview-Commit-ID: HY1XbcliTNA

--HG--
extra : rebase_source : f02093222f1cc619e328c877382361950f83329d
2017-01-12 16:37:37 -05:00
Geoff Brown
839ad41abf Bug 1319196 - Call dumpsys less during Android tests; r=jmaher
Android tests use dumpsys to determine the current "top activity";
if Firefox is not in the foreground, tests are considered complete.
But dumpsys is heavy-weight and can fail, for reasons unknown. With
this patch, test harnesses continue to use dumpsys to determine the
top activity, but call it much less often: If the harness has just
received new test output, the harness assumes that tests are in
progress and does not check the top activity.
2017-01-06 16:35:29 -07:00
Geoff Brown
d1584879a8 Bug 1319196 - Take screenshot when dumpsys fails; r=jmaher 2016-12-13 11:28:06 -07:00
Geoff Brown
094fe98143 Bug 1309436 - Add test name to java-exception failure messages; r=ted 2016-10-26 11:31:41 -06:00
Geoff Brown
306a94e967 Bug 1290114 - Make Android test logging more responsive; r=ahal 2016-07-29 08:29:53 -06:00
Michael Comella
af565b6cbb Bug 1277214 - Move MOZ_DISABLE_* to single MOZ_IN_AUTOMATION env var. r=grisha
We hit an issue where adding a new env var, MOZ_DISABLE_TELEMETRY, added env10
and caused crashes. I suspect the issue is that there are is now a double-digit
number of env vars (bug 1277390). Here, we do the quick fix by removing
MOZ_DISABLE_TELEMETRY & repurposing MOZ_DISABLE_SWITCHBOARD to be generic.

While we're at it, we simplify the code by making the setDisabled methods a
strict getter without checking for how many times they're called.

MozReview-Commit-ID: 19DDbVYRZ2

--HG--
extra : rebase_source : 1590ae4f49bf725ab8a3bb26f10dab324903aa8c
2016-06-01 16:46:44 -07:00
Michael Comella
1e85dedec9 Bug 1270191 - Disable telemetry upload during tests. r=grisha
MozReview-Commit-ID: GoQQRfGRvd4

--HG--
extra : rebase_source : c2d56638e078012766e8f7c9b64de6d3988e6dbc
2016-05-31 17:04:40 -07:00
Geoff Brown
52509fd074 Bug 1255527 - Remove sutagent/watcher; r=jmaher 2016-03-15 08:21:30 -06:00
Andrew Halberstadt
6e6c1c8aae Bug 1245092 - Install reftest and specialpowers extensions at runtime via AddonManager.installTemporaryAddon, r=jgriffin
MozReview-Commit-ID: 5HSa3nFVTeF

--HG--
rename : layout/tools/reftest/reftest.js => layout/tools/reftest/reftest.jsm
extra : rebase_source : 924a3e937b47cac03674acdb56334882a2373f50
2016-03-09 14:38:13 -05:00
Andi-Bogdan Postelnicu
e03252bb44 Bug 1251213 - release resources from fis. r=sebastian
MozReview-Commit-ID: 9RTJprP6rh2

--HG--
extra : rebase_source : 7fb7fa4421d2e4059b4922313dc4fbc40239b863
2016-03-02 11:02:44 +02:00
Margaret Leibovic
e0825d6416 Bug 1247324 - Disable Switchboard in automation. r=gbrown,mfinkle
MozReview-Commit-ID: ItqHBIEdD0Q

--HG--
extra : rebase_source : 639eebe0ee5854beef82695729d73dc001af8fac
2016-02-18 12:03:51 -05:00
Andrew Halberstadt
dee8b08ce5 Bug 1231784 - Install specialpowers and mochikit extensions at runtime via AddonManager.loadTemporaryAddon(), r=jgriffin
MozReview-Commit-ID: 9I56x6Vnbf7

--HG--
rename : testing/mochitest/b2g_start_script.js => testing/mochitest/start_b2g.js
extra : commitid : CrUflHO8tRa
extra : rebase_source : c50792dfe82e688b52aa07150ddab03e5d0d3f36
extra : amend_source : 1dcd8ae7d74b3397e965672b6dc05d431ab4a916
extra : source : edcbd7c0aa36be0846f2e8e989fb57c9e4449cc4
2016-01-25 09:55:57 -05:00
Andrew Halberstadt
97c3a77bc1 Bug 1247054 - Fix |mach reftest| on Android, r=gbrown
There is an ImportError on Android, as well as a log related
regression from the structured log patch once that is fixed.

MozReview-Commit-ID: KxSEotr38qO

--HG--
extra : rebase_source : 15d8421aab813d9e0dbf6d00611f921aaa779a49
2016-02-09 16:19:44 -05:00