Граф коммитов

176 Коммитов

Автор SHA1 Сообщение Дата
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Simon Giesecke 987aea606d Bug 1669652 - Fix llvm-symbolizer path encoding. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D92744
2020-10-07 13:49:41 +00:00
Bob Clary eda9179372 Bug 1651196 - add additional logging for remotegtests.py AppWaiter.update_log, r=jmaher.
Depends on D90012

Differential Revision: https://phabricator.services.mozilla.com/D90013
2020-09-14 13:56:14 +00:00
Geoff Brown 7909a5e0cd Bug 1658033 - Turn off verbose output from adb in android gtests; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D86433
2020-08-07 22:43:54 +00:00
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Geoff Brown 2046699f13 Bug 1654319 - Remove some flake8 exclusions; r=jmaher
Remove some exclusions so that more files are linted. These exclusions had
been made to allow for code that was not py3 compatible, but with recent
py3 efforts, the exclusions can be removed. (Linting subsequently found
a few small issues which needed to be fixed.)

Differential Revision: https://phabricator.services.mozilla.com/D84393
2020-07-21 17:10:51 +00:00
Bob Clary 6187c5614b Bug 1486004 - Part 8 - Update gtests to support unrooted android devices using mozdevice 4.0.0, r=gbrown
Depends on D82750

Differential Revision: https://phabricator.services.mozilla.com/D82751
2020-07-17 20:48:31 +00:00
Narcis Beleuzu b1faa2872a Backed out 17 changesets (bug 1486004) for wrench bustage on android.py . CLOSED TREE
Backed out changeset cae730f105d7 (bug 1486004)
Backed out changeset e0094d50a315 (bug 1486004)
Backed out changeset 424425ed98c6 (bug 1486004)
Backed out changeset 551232749abe (bug 1486004)
Backed out changeset 505747095def (bug 1486004)
Backed out changeset 5b1c62c4a4d5 (bug 1486004)
Backed out changeset 0a1c8d50ee69 (bug 1486004)
Backed out changeset 6ef81c676859 (bug 1486004)
Backed out changeset 234e55153fb6 (bug 1486004)
Backed out changeset 2f33b309d746 (bug 1486004)
Backed out changeset 48947692c176 (bug 1486004)
Backed out changeset 473bac8eedd9 (bug 1486004)
Backed out changeset af6afed0a04a (bug 1486004)
Backed out changeset a0e2f91eb4d4 (bug 1486004)
Backed out changeset 138c987440c7 (bug 1486004)
Backed out changeset 6d2e305f4722 (bug 1486004)
Backed out changeset 1181ff03bb05 (bug 1486004)
2020-07-17 23:43:57 +03:00
Bob Clary 74c24e8003 Bug 1486004 - Part 8 - Update gtests to support unrooted android devices using mozdevice 4.0.0, r=gbrown
Depends on D82750

Differential Revision: https://phabricator.services.mozilla.com/D82751
2020-07-16 21:32:54 +00:00
Narcis Beleuzu 1eb115035d Backed out 20 changesets (bug 1486004, bug 1653094) for wrench bustages. CLOSED TREE
Backed out changeset 120c64ebdea3 (bug 1486004)
Backed out changeset b10f105b1c36 (bug 1486004)
Backed out changeset 7f186e6bcccc (bug 1486004)
Backed out changeset cdda7b349cd8 (bug 1486004)
Backed out changeset 650c47e81402 (bug 1486004)
Backed out changeset 2bcca7cf3f1b (bug 1486004)
Backed out changeset e1df276f8a8d (bug 1486004)
Backed out changeset f6f5e7f2bd0a (bug 1486004)
Backed out changeset 1c56cb03ce53 (bug 1486004)
Backed out changeset 582cd190f174 (bug 1486004)
Backed out changeset 7c162e1b3a79 (bug 1486004)
Backed out changeset d1088e178216 (bug 1486004)
Backed out changeset 40763f4afd26 (bug 1486004)
Backed out changeset f20eb5b5a670 (bug 1486004)
Backed out changeset 6349ee0bd63f (bug 1486004)
Backed out changeset 7c23729053f6 (bug 1486004)
Backed out changeset 49586014bd29 (bug 1486004)
Backed out changeset 07971e82ae85 (bug 1653094)
Backed out changeset 47e7295e9c19 (bug 1653094)
Backed out changeset 57a25bbeec37 (bug 1653094)
2020-07-16 17:58:09 +03:00
Bob Clary 5e579c5dda Bug 1486004 - Part 8 - Update gtests to support unrooted android devices using mozdevice 4.0.0, r=gbrown
Depends on D82750

Differential Revision: https://phabricator.services.mozilla.com/D82751
2020-07-15 20:58:40 +00:00
Mihai Alexandru Michis a1d49fb98d Backed out 17 changesets (bug 1486004) for causing bustages in AccessCheck.h
CLOSED TREE

Backed out changeset 86a0855e1e45 (bug 1486004)
Backed out changeset 4fc98067edc5 (bug 1486004)
Backed out changeset 8ab3f1597fde (bug 1486004)
Backed out changeset b487e98320fb (bug 1486004)
Backed out changeset 4cba8e6bc515 (bug 1486004)
Backed out changeset d0db5eef2343 (bug 1486004)
Backed out changeset 50285a87de6b (bug 1486004)
Backed out changeset 9730c0303810 (bug 1486004)
Backed out changeset 140a9d2362f3 (bug 1486004)
Backed out changeset 9d1ce06f6039 (bug 1486004)
Backed out changeset 88a5a4ab39fa (bug 1486004)
Backed out changeset eb186c92232d (bug 1486004)
Backed out changeset 677f2129750e (bug 1486004)
Backed out changeset 81427a5f2103 (bug 1486004)
Backed out changeset 38d7def3d425 (bug 1486004)
Backed out changeset a9e73221c471 (bug 1486004)
Backed out changeset ebe8c2d5432e (bug 1486004)
2020-07-16 15:29:29 +03:00
Bob Clary 8aa565af70 Bug 1486004 - Part 8 - Update gtests to support unrooted android devices using mozdevice 4.0.0, r=gbrown
Depends on D82750

Differential Revision: https://phabricator.services.mozilla.com/D82751
2020-07-15 20:58:40 +00:00
Gabriele Svelto dd8be7773a Bug 1638856 - Increase the stack space passed to the child process to accomodate for its usage r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D81372
2020-06-30 08:49:00 +00:00
Geoff Brown 21053c0624 Bug 1638965 - Run 'mach gtest' in python 3; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D77092
2020-05-27 20:53:22 +00:00
Bob Clary 80ab483d5d Bug 1633302 - Remote android tests must use root=True appropriately when dealing with app created files, r=gbrown.
Depends on D72576

Differential Revision: https://phabricator.services.mozilla.com/D72577
2020-04-27 15:45:59 +00:00
Geoff Brown e245496607 Bug 1612345 - Ensure that most custom retriggers repeat the original task by default; r=bc
Various updates to the custom retrigger action so that, without any custom changes to
parameters, the retriggered task runs with the same parameters as the original task.
Several issues were found and corrected, notably:
 - parameters like --allow-software-gl-layers were ignored
 - MOZHARNESS_TEST_PATHS was ignored
 - many parameter customizations in the desktop mozharness configs were ignored
 - mochitest suite/subsuite/flavor selection was not always correct
 - using repeat=1 by default meant that each test ran twice

Differential Revision: https://phabricator.services.mozilla.com/D70457
2020-04-17 22:11:02 +00:00
Sylvestre Ledru 734f79b541 Bug 1624237 - Run misc-unused-using-decls - Remove useless declarations r=andi
$ ./mach static-analysis check --checks="-*, misc-unused-using-decls" --fix <path>

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

--HG--
extra : moz-landing-system : lando
2020-03-23 13:15:33 +00:00
Geoff Brown abf6e0fdc4 Bug 1612345 - Add custom retrigger support for gtest; r=bc
Add test package mach support for gtest and hook into the custom retrigger
action. Some existing custom retrigger features, like setting gecko prefs,
are not (easily) applicable to gtest, which doesn't use mozprofile; for
this reason, use a separate action context with items suitable for gtest.

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

--HG--
extra : moz-landing-system : lando
2020-03-19 16:12:51 +00:00
Geoff Brown f9b51b3540 Bug 1612345 - Convert gtest argument parser to argparse; r=bc
Convert the gtest option parser from optparse to argparse. mochitest, reftest,
and other suites use argparse. Using argparse will simplify the integration
of gtest with the custom retrigger action.

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

--HG--
extra : moz-landing-system : lando
2020-03-11 23:46:08 +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
Geoff Brown 14153653a8 Bug 1581157 - Improve gtest completion logging; r=bc
Improve gtest diagnostics in an effort to improve our understanding
of this intermittent failure.

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

--HG--
extra : moz-landing-system : lando
2019-10-25 21:18:50 +00:00
Geoff Brown 3dbb203a84 Bug 1558885 - Use separate directory for android gtest libxul; r=bc,nalexander
In Android gtest, instead of pushing the gtest libxul.so to the
(assumed and potentially incorrect) location of the test application's
libraries, push libxul.so to /data/local/gtest, and direct the linker
to use that instead.

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

--HG--
extra : moz-landing-system : lando
2019-10-10 21:38:01 +00:00
Geoff Brown 971d9e3214 Bug 1565497 - Improve android gtest's wait for final output; r=jmaher
A possible explanation for the infrequent observation of an incomplete log is that
the log is still being written when the harness detects that the process has completed.
Waiting for one extra polling interval may avoid this.

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

--HG--
extra : moz-landing-system : lando
2019-07-19 07:56:39 +00:00
Kartikaya Gupta 711c133f6d Bug 1558598 - Force WebRender on or off in the gtest harness. r=ahal
This covers the local and remote gtests, as well as the mach command.

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

--HG--
extra : moz-landing-system : lando
2019-06-29 09:48:16 +00:00
Chris Manchester 4158f69bc1 Bug 1559982 - Make testing/gtest importable with python 3. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35245

--HG--
extra : moz-landing-system : lando
2019-06-26 23:06:51 +00:00
Geoff Brown ad79adad7c Bug 1561737 - Log full exception traceback from android gtest; r=bc
Including the traceback info will include the exception name, like "ADBError" which
should trigger the android-em task retry; it also provides more debugging info.

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

--HG--
extra : moz-landing-system : lando
2019-06-27 09:26:35 +00:00
Mihai Alexandru Michis 9852c55d11 Backed out 5 changesets (bug 1559982, bug 1559975) for cpp unit test failures due to unsupported operand type. CLOSED TREE
Backed out changeset 2309aac6cea3 (bug 1559975)
Backed out changeset bf5a6d853abd (bug 1559975)
Backed out changeset 0c36f78c971a (bug 1559975)
Backed out changeset 0560cf7df7dc (bug 1559975)
Backed out changeset 4cb64ca524e7 (bug 1559982)
2019-06-27 02:03:31 +03:00
Chris Manchester 89a6a2647d Bug 1559982 - Make testing/gtest importable with python 3. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35245

--HG--
extra : moz-landing-system : lando
2019-06-24 21:20:43 +00:00
Geoff Brown 710630afc9 Bug 1558867 - Report log for short runs of 'mach gtest'; r=bc
This allows me to run 'mach gtest "APZ*"' and other short runs of gtest
that were previously failing.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 20:38:37 +00:00
Geoff Brown 110084336b Bug 1550161 - Avoid attribute error in android gtest; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D30593

--HG--
extra : moz-landing-system : lando
2019-05-10 01:19:43 +00:00
Gijs Kruitbosch c14acdeadd Bug 1548941 - remove e10s force-enable and force-disable prefs, and on desktop restrict 'normal' e10s pref to automation and unofficial builds, r=bholley,ahal
Differential Revision: https://phabricator.services.mozilla.com/D29892

--HG--
extra : moz-landing-system : lando
2019-05-09 21:55:46 +00:00
Geoff Brown 230da20010 Bug 1549380 - Increase gtest process timeout from 20 minutes to 40 minutes; r=jmaher
Increasing the timeout avoids a perma-fail on linux64/ccov and leaves room for the
test suite to grow on all platforms.

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

--HG--
extra : moz-landing-system : lando
2019-05-06 18:53:54 +00:00
Geoff Brown 51f5d3a884 Bug 1548555 - For android gtest, push support files to device; r=bc
Differential Revision: https://phabricator.services.mozilla.com/D29837

--HG--
extra : moz-landing-system : lando
2019-05-03 17:45:21 +00:00
Geoff Brown 069f6587db Bug 1318091 - Support |mach gtest| for android; r=bc
Add basic support for 'mach gtest' on Android.
Handling of Android-only and desktop-only options is awkward; I hope to
re-visit this after bug 1519369.

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

--HG--
extra : moz-landing-system : lando
2019-04-22 15:55:23 +00:00
Geoff Brown f1e06657d2 Bug 1318091 - Add more options to remotegtests.py; r=bc
Support --shuffle and <gtest_filter> for android gtest.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 17:47:58 +00:00
Geoff Brown c83acb1180 Bug 1318091 - Add remotegtests.py, supporting android gtests; r=bc
Adds remotegtests.py, like rungtests.py, but for Android. Unlike some other test harnesses, remotegtests is not a sub-class of rungtests: There wasn't much code that could be re-used.

The code to wait for the test app and collect and display the log is derived from and similar to existing code in remoteautomation.py: I didn't want to increase reliance on remoteautomation; I don't mind a bit of code duplication.

There is a TODO item related to libxul.so. gtest runs in the browser, but with tests compiled into a gtest-specific version of libxul.so. remotegtests.py patches the installed app by pushing the libxul.so to the installation directory of the app -- root required and fragile, but works fine on the emulator. I think the "right" way to do this is to create a gtest-specific apk; I plan to file a follow-up bug and petition build folks to help sort that out.

I have been running this locally with:
  mach gtest (builds gtests, then errors out)
  mach python testing/gtest/remotegtests.py --libxul=/home/gbrown/objdirs/x86_64/dist/bin/gtest/libxul.so
Work-in-progress on 'mach gtest' will make this much simpler.

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

--HG--
extra : moz-landing-system : lando
2019-04-12 15:04:39 +00:00
Sylvestre Ledru 7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Geoff Brown a6180a6479 Bug 1318091 - Support env override of gtest minidump location; r=Ehsan
Desktop gtest creates minidumps in the current working directory. That is
problematic on Android, since the test app's cwd may not be writable, or
may not be readable by the test harness. This patch allows the test harness
to specify an alternate minidump path with environment variable
MOZ_GTEST_MINIDUMPS_PATH.

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

--HG--
extra : moz-landing-system : lando
2019-04-11 01:25:02 +00:00
Geoff Brown 33aac3ce8e Bug 1318091 - Support logging to file in mozilla gtest; r=bc,Ehsan
On Android, update mozilla gtest logging so that logging appears in the Android logcat.
Also, when MOZ_GTEST_LOG_PATH is defined in the environment, create the named file
and direct logging to that file. Android gtest will use this to collect gtest logging from
the device and copy it to the test log.

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

--HG--
extra : moz-landing-system : lando
2019-04-10 22:11:48 +00:00
Sylvestre Ledru 03fc65347c Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:42:17 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Ryan VanderMeulen 8c673bb9c6 Bug 1534605 - Update gtest and gmock to version 1.8.1. r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D23118

--HG--
extra : moz-landing-system : lando
2019-03-12 16:34:09 +00:00
Boris Zbarsky 68863e1004 Bug 1533617 part 4. Mark virtual methods with CAN_RUN_SCRIPT overrides as CAN_RUN_SCRIPT. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D22838

--HG--
extra : moz-landing-system : lando
2019-03-11 14:20:29 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
terrameijar 3a49f2d315 Bug 1506611 - Fixed linter errors in testing/gtest r=ahal
Before this change, testing/gtest had 19 errors. These errors have been resolved.

Bug 1506611 - Fixed flake8 errors in testing/gtest

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

--HG--
extra : moz-landing-system : lando
2018-12-31 16:51:03 +00:00