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

1940 Коммитов

Автор SHA1 Сообщение Дата
Jim Porter da72965e62 Bug 1631806 - [part 1] Update perftests to use new API and fix `--proxy` option; r=tarek
This patch fixes the tests in testing/performance/ that hadn't been updated to
the new API, as well as fixing a couple issues with the `--proxy` option:

 * `policy.json` wasn't being logged correctly, since mozlog was treating the
   data as a format string

 * Proxy prefs weren't being set correctly for the profile

Differential Revision: https://phabricator.services.mozilla.com/D79937
2020-06-17 09:41:24 +00:00
Ricky Stewart ce17cf368b Bug 1645179 - Squash remaining dead code after removal of IMPACTED_TESTS r=ahal,froydnj
There is some remaining code in central originating from bug 1184405, which sought to associate source files with their "affected" test files. That ended up not panning out, and bug 1644228 removed a lot of that code, but left some remnants in the `Files` object which are still referenced in a couple different places. I'm deleting all of that code in `context.py` plus everything that references it for the following reasons:

1. Right now, `Files.{test_files,test_tags,test_flavors}` do get populated, but only ever with "default" values -- namely `moz.build` files that are above the files in question in the directory hierarchy. This is a heuristic that doesn't actually have anything to do with mapping source files to their corresponding test files, which is misleading.

2. Those attributes are accessed in two places. The first is in the `mach file-info dep-tests` command. This command isn't referenced anywhere else in tree and I don't have any evidence anyone ever uses it. Even if they do, I would claim that doing so is a mistake (because the results of the command aren't meaningful and are just populated by the "defaults" described above), and that person's workflow should be migrated to something else that *is* meaningful.

3. The second place where this metadata is accessed is in `testing/mozbase/moztest/moztest/resolve.py`; that method is invoked in `tools/tryselect/selectors/syntax.py`, but only if you pass `--detect-paths` to `mach try syntax`. This is [entirely broken](https://bugzilla.mozilla.org/show_bug.cgi?id=1614614), and even if we made an effort to fix it, it wouldn't do anything resembling what the documentation of `--detect-paths` suggests it would do (again, because the data isn't populated meaningfully). So I'm deleting the command line option entirely.

Differential Revision: https://phabricator.services.mozilla.com/D79711
2020-06-17 13:30:49 +00:00
William Lachance 76a1d84247 Bug 1646038 - Bump mozinfo version r=egao
Depends on D79817

Differential Revision: https://phabricator.services.mozilla.com/D79818
2020-06-16 16:41:54 +00:00
William Lachance 3b7378876a Bug 1646038 - Loosen distro dependency in mozinfo r=egao
Differential Revision: https://phabricator.services.mozilla.com/D79817
2020-06-16 16:41:42 +00:00
Edwin Takahashi 99dacab80b Bug 1634554 - Part 0: TestResolver to use the path to web-platform-tests up to maximum depth of 3 r=ahal
Changes:
  - when generating the `groups` in TestResolver for web-platform-tests, use the paths to the test files up to a maximum depth of 3 by default.

Differential Revision: https://phabricator.services.mozilla.com/D79355
2020-06-15 19:31:54 +00:00
Bogdan Tara 30c59d36db Backed out 5 changesets (bug 1634554) for lint failure CLOSED TREE
Backed out changeset e8db70067dbf (bug 1634554)
Backed out changeset ae24c9902708 (bug 1634554)
Backed out changeset 177cc940d57f (bug 1634554)
Backed out changeset 3240acbd85b6 (bug 1634554)
Backed out changeset 71aa576ada8b (bug 1634554)
2020-06-15 22:25:12 +03:00
Edwin Takahashi 2c64566bab Bug 1634554 - Part 0: TestResolver to use the path to web-platform-tests up to maximum depth of 3 r=ahal
Changes:
  - when generating the `groups` in TestResolver for web-platform-tests, use the paths to the test files up to a maximum depth of 3 by default.

Differential Revision: https://phabricator.services.mozilla.com/D79355
2020-06-12 20:41:42 +00:00
Hamzah b96628236d Bug 1626934 - [mozprocess] TypeError when using ProcessHandler without the argument on Python 3 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D79477
2020-06-15 14:18:12 +00:00
Edwin Takahashi 606a8388cd Bug 1632429 - bump mozhttpd version to 0.7.1 r=gbrown
Due to minor changes in D78159 and D77965 I figured it would be a good idea to release the bugfix version bump to pypi, despite our intention to discontinue using mozhttpd (Bug 1428709).

Differential Revision: https://phabricator.services.mozilla.com/D78163
2020-06-03 21:59:46 +00:00
Andrew Halberstadt c10f9d3fbf Bug 1638430 - [moztest] Use proper group and test ids for WPT from TestResolver.tests_by_manifest, r=egao
For most test suites, the manifest id is the same as its relative path from
mozilla-central.  But for WPT they are different. We decided to store the ids
in the 'manifest' attribute rather than 'manifest_relpath' since the latter
implies it is a file system path (which WPT manifest ids are not).

This patch takes this difference into account in
'TestResolver.tests_by_manifest'. It will consequently get the proper manifest
ids stored in the Decision task's 'tests-by-manifest.json.gz'.

Depends on D79338

Differential Revision: https://phabricator.services.mozilla.com/D79339
2020-06-11 18:56:49 +00:00
Andrew Halberstadt e7e61bbad5 Bug 1638430 - [moztest] Add ability to test web-platform-tests in the TestResolver, r=egao
WPT loads test metadata after the fact (and it is the same regardless of the
loader being used). This adds a file called 'wpt_manifest_data.json' which,
combined with the related fixture, can mock out what WPT's manifestupdate
script returns.

Differential Revision: https://phabricator.services.mozilla.com/D79338
2020-06-11 18:58:25 +00:00
Rob Wu ed50201953 Bug 1644793 - Fix test_manifestparser.py to expect relative ancestor_manifest r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D79190
2020-06-11 14:05:24 +00:00
Tom Ritter 44f291055e Bug 1637845 - Clean up mozfile r=gbrown
Run file through black, then re-order the imports at the top in order of strlen

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

Depends on D76083
2020-06-10 14:44:48 +00:00
Tom Ritter 2817c7615b Bug 1637845 - Add a new function 'copy_contents' to mozfile r=glob
When you have a directory src and you want to move all the contents
to dst, this is surprisingly annoying. shutil.move doesn't operate
on globs. shutil.copytree does exactly what we need *except* it
requires the destination to not exist. In Python 3.7 it gained the
ability to not care about the destination existing but... we need
to handle the pre-Python 3.7 case.

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

Depends on D75698
2020-06-10 14:44:13 +00:00
Rob Wu 76bdae14a2 Bug 1524557 - Re-enable manifestparser/tests/test_default_overrides.py r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D78922
2020-06-09 16:39:10 +00:00
Rob Wu 07386a9fc0 Bug 1644223 - Fix path normalization to correctly inherit manifest defaults on Windows r=gbrown
Note: the bug is fixed by the change in resolve.py.

manifestparser.py has no behavioral changes. It was refactored to make
the type (i.e. normalized absolute path) of `parentmanifest` more
obvious, and as a nice bonus the manifest_relpath value is generated
only once, instead of anew for every section in the test manifest.

Differential Revision: https://phabricator.services.mozilla.com/D78921
2020-06-10 15:12:33 +00:00
Rob Wu f962d4cade Bug 1644223 - Add unit test to verify that manifest_defaults are correctly read from test-defaults.pkl r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D78920
2020-06-09 17:45:17 +00:00
Rob Wu 9d0da35952 Bug 1644223 - Avoid unnecessary rebuild in test_resolve.py r=gbrown
test_resolve.py spends too much time on running. This is because the
backend was regenerated using data from the whole tree, at every test
despite the test fixture.

Differential Revision: https://phabricator.services.mozilla.com/D78919
2020-06-09 17:15:33 +00:00
Geoff Brown d0f02440a4 Bug 1422005 - Fix 'mach test cppunittest'; r=jmaher
Correct typo in parameter name to enable 'mach test cppunittest'.

Differential Revision: https://phabricator.services.mozilla.com/D78984
2020-06-09 22:32:21 +00:00
Mitchell Hentges fdfbc5b1f4 Bug 1621960: Improves mozhttpd compatibility with Python 3 r=egao
Depends on D77964

Differential Revision: https://phabricator.services.mozilla.com/D77965
2020-06-09 18:48:19 +00:00
Geoff Brown 446e3be5f6 Bug 1516847 - Update help and remove support for 'mach test' with no arguments; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D78804
2020-06-09 19:35:19 +00:00
Noemi Erli 9017f973e3 Backed out 4 changesets (bug 1621960) for causing Android bustages CLOSED TREE
Backed out changeset f36a95234a5f (bug 1621960)
Backed out changeset 0e4661c9061d (bug 1621960)
Backed out changeset 3e2cbe4dd777 (bug 1621960)
Backed out changeset d7eb101e5df7 (bug 1621960)
2020-06-09 20:59:26 +03:00
Mitchell Hentges fc50a9dcd8 Bug 1621960: Improves mozhttpd compatibility with Python 3 r=egao
Depends on D77964

Differential Revision: https://phabricator.services.mozilla.com/D77965
2020-06-09 16:44:32 +00:00
Mitchell Hentges ed90a04ad1 Bug 1632874: |mach bootstrap| should write mozconfig file if it doesn't exist r=rstewart
Rather than always printing instructions at the end of the bootstrap phase, we will now create a mozconfig
file if one doesn't exist and there's configuration to be written.

Differential Revision: https://phabricator.services.mozilla.com/D78417
2020-06-08 19:36:56 +00:00
Mitchell Hentges 491503feab Bug 1643166: EasyServer prints stack trace when it encounters an error r=egao
Differential Revision: https://phabricator.services.mozilla.com/D78159
2020-06-03 21:58:45 +00:00
James Graham d8ee17bdef Bug 1644025 - Try to rebuild manifest if we get a ManifestError when loading, r=Ms2ger
Differential Revision: https://phabricator.services.mozilla.com/D78651
2020-06-08 14:18:00 +00:00
Sebastian Hengst b22cf04e2b Bug 1644025 - Force rebuild for wpt data. a=supposed-bustage-fix CLOSED TREE 2020-06-07 19:09:35 +02:00
Bob Clary c457eaa29c Bug 1642672 - [mozdevice 3.2.3] Ensure content of files and process output is converted to str for Python 3, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D77844
2020-06-02 20:43:45 +00:00
Bob Clary 98df40a194 Bug 1642313 - mozbase manifestparser chunk_by_manifest should not use dicts in key comparison during sort, r=ahal.
Differential Revision: https://phabricator.services.mozilla.com/D77817
2020-06-02 18:55:37 +00:00
Narcis Beleuzu 4836af4aff Backed out changeset ab0fcba34420 (bug 1642662) for causing Bug 1642773. CLOSED TREE 2020-06-03 00:49:42 +03:00
Bob Clary 1927befd10 Bug 1642662 - [mozcrash] Convert output of minidump_stackwalk from bytes to str in _process_dump_file in Python3, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D77840
2020-06-02 17:19:13 +00:00
Chris AtLee 57114676ed Bug 1638990: Allow manifest expression parsing to work with py3 r=egao
In Py2, None compares as less than all strings and numbers.
In Py3, None isn't comparable with < to strings or numbers.

For unset variables, use "" as the value for the purposes of parsing manifest expressions.

Differential Revision: https://phabricator.services.mozilla.com/D76134
2020-06-02 16:01:50 +00:00
Ricky Stewart 99c97f553a Bug 1642385 - Add foolproof error message to mozprocess when write errors occur r=froydnj
When people do Python 3 work and encounter an exception on this line, their first instinct is to do a `blame` and then NI me on the bug (which, fair enough). However when this particular issue is encountered it's usually that the `ProcessHandler` API is being invoked incorrectly and the process isn't being opened in the correct mode. Here we dump an error message to the screen immediately before the exception is thrown to hopefully point people working on dependencies of bug 1577599 on the right path.

Differential Revision: https://phabricator.services.mozilla.com/D77684
2020-06-01 19:41:10 +00:00
Nils Ohlmeier [:drno] 18ef0cb66a Bug 1641289: Bye, bye Steeplechase. r=dminor,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D77114
2020-05-29 03:19:27 +00:00
egao 45a93dd0b7 Bug 1637011 - refactor web-platform-tests chunking process in chunking.py r=ahal
Changes:

  - for web-platform-tests codepath, no longer perform filtering of the runtimes information to a list of key:value.
  - for web-platform-tests codepath, load runtimes information into an OrderedDict in order from highest to lowest runtime.
  - if any test paths remain after initial chunking by runtime information, distribute such paths across all chunks.

Differential Revision: https://phabricator.services.mozilla.com/D76538
2020-05-27 20:21:48 +00:00
Sylvestre Ledru de03967deb Bug 1640532 - docs - fix some typos DONTBUILD r=webdriver-reviewers,whimboo
Depends on D76636

Differential Revision: https://phabricator.services.mozilla.com/D76637
2020-05-25 11:30:05 +00:00
egao a8d0e51833 Bug 1637463 - writeruntimes script to output runtime information into nested dictionary r=ahal
Changes:

Update `writeruntimes` script so that each suite is in its own nested dictionary and add the ability to query `web-platform-tests-reftest`.

Differential Revision: https://phabricator.services.mozilla.com/D75229
2020-05-23 01:46:42 +00:00
Mihai Alexandru Michis 74ff68a9a5 Backed out 3 changesets (bug 1637463) for causing bc jobs to timeout.
CLOSED TREE

Backed out changeset 93efb53380c2 (bug 1637463)
Backed out changeset 5c8ccda5f1b1 (bug 1637463)
Backed out changeset a5fc1b604238 (bug 1637463)
2020-05-23 02:35:26 +03:00
Ricky Stewart e2fe57521b Bug 1638060 - Standardize interface of `mozfile` classes as `bytes`-based streams r=glandium
At the beginning of the Python 3 migration (circa bug 1602540), we made an update to the interface of `mozpack/files.py` in the direction of aligning with Python 3's built-in `file` support; namely, that opening a file in text mode returns a stream of `str` (text), and that opening a file in binary mode returns a stream of `bytes`. This was deemed to be more trouble than it was worth. This patch undoes all of those changes to the interface in favor of moving back to the Python 2 style, where all files are bytestreams.

Differential Revision: https://phabricator.services.mozilla.com/D75424
2020-05-22 01:11:29 +00:00
Geoff Brown f39c1aeb51 Bug 1428718 - [moztest] Support python 3; r=egao
I noticed one more moztest issue in bug 1638993: sorting an array of dict is
poorly defined on py2 and not tolerated on py3; adding the lambda clarifies
the behavior. With this resolved, I think we can bump the moztest version and
close this bug.

Differential Revision: https://phabricator.services.mozilla.com/D76486
2020-05-22 16:12:05 +00:00
egao cf9f527a4f Bug 1637463 - writeruntimes script to output runtime information into nested dictionary r=ahal
Changes:

Update `writeruntimes` script so that each suite is in its own nested dictionary and add the ability to query `web-platform-tests-reftest`.

Differential Revision: https://phabricator.services.mozilla.com/D75229
2020-05-20 22:01:47 +00:00
Geoff Brown 7e002b7daf Bug 1599261 - [moztest] Enable test_resolve.py on py3; r=egao
This test is passing now on python 3, both locally and on try.

Differential Revision: https://phabricator.services.mozilla.com/D76370
2020-05-22 16:17:47 +00:00
Geoff Brown 2bd1ea09d5 Bug 1558667 - Try to make test_resource_monitor.py more robust; r=ahal
This test has been failing, infrequently, mostly on osx/py2, for many months.
Increasing the time interval between events appears to reduce failure frequency.

Differential Revision: https://phabricator.services.mozilla.com/D76402
2020-05-22 15:08:54 +00:00
Greg Tatum 861a2adda1 Bug 1628073 - Add python 3 support to mozgeckoprofiler; r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D75579
2020-05-22 13:21:09 +00:00
Greg Tatum 5d3c780295 Bug 1628073 - Run black autoformatting on mozgeckoprofiler; r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D75578
2020-05-22 13:20:51 +00:00
Greg Tatum bce099a26d Bug 1628073 - Add a test for the view gecko profile tool; r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D74295
2020-05-22 13:20:10 +00:00
Greg Tatum af96a9bd04 Bug 1628073 - Add documentation to mozgeckoprofiler; r=sparky
Differential Revision: https://phabricator.services.mozilla.com/D74292
2020-05-22 13:19:40 +00:00
Greg Tatum c5ee06d110 Bug 1628073 - Use mozlog in the mozgeckoprofiler; r=gbrown
This patch changes over all of the logging to use the structured mozlog package.
I also ensured that the messages were logged in a way to be useful for end users
of mochitests. This means there were a few small changes in methods in order to
accommodate the logging. The behavior outside of logging should be the same.

Differential Revision: https://phabricator.services.mozilla.com/D74291
2020-05-22 13:19:27 +00:00
Greg Tatum ced168b874 Bug 1628073 - Hook up symbolication to mochitests; r=gbrown
Differential Revision: https://phabricator.services.mozilla.com/D74290
2020-05-22 13:19:04 +00:00
Greg Tatum 593ab0604f Bug 1628073 - Move gecko profiler testing files to mozgeckoprofiler; r=sparky,perftest-reviewers,gbrown
I need to add symbolication support for the mochitest Gecko Profiler command line
option. These profiles also need to be symbolicated. Unfortunately, there is not
a common place where I could use these files. Talos and Raptor each had their
own copy of the snappy symbolication server.

This commit consolidates these packages into a re-usable mozbase package that can
be used in mochitests, and eventually in other places like xpcshell tests.

I stubbed out a test file, but it doesn't do anything quite yet. This commit makes
it so that the tests still work in Raptor and Talos, but doesn't add any features.
It also doesn't try too hard to make the files look like a mozbase package.

Differential Revision: https://phabricator.services.mozilla.com/D74289
2020-05-22 13:18:44 +00:00