Make web-platform-tests run with py3 in CI
Categories
(Testing :: web-platform-tests, task)
Tracking
(firefox86 fixed)
| Tracking | Status | |
|---|---|---|
| firefox86 | --- | fixed |
People
(Reporter: jgraham, Assigned: jgraham)
References
(Blocks 1 open bug)
Details
Attachments
(14 files, 3 obsolete files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
This depends on upstream switching over; the timetable for that is https://github.com/web-platform-tests/rfcs/blob/master/rfcs/py_3.md Based on that timetable, we should expect to switch at the start of December.
| Assignee | ||
Comment 1•5 years ago
|
||
It's not the same as the stdlib for 3.6+ and is present on 3
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
| Assignee | ||
Comment 3•5 years ago
|
||
This doesn't make sense since tests are running on the device, not
locally.
| Assignee | ||
Comment 4•5 years ago
|
||
This makes Linux match Windows and macOS, and avoids a py3-only bug
where mozrunner desctructors can end up being called incorrectly in
the child process, so causing tests to fail.
To do this correctly turns out to require using an explicit context
which we pass down to everywhere we use multiprocessing. That's
because wptrunner isn't usually invoked directly but from a frontend
like wpt run or mach. Therefore spawned processed don't go through
the same entrypoint as the initial process and so don't set the
context themselves.
This unfortunately requires backwards-incompatible changes in mozlog,
so that will need to be released for this to land upstream.
| Assignee | ||
Comment 5•5 years ago
|
||
data[bytes] must exist but can be None; comaping None with an integer
is an error in Py3
| Assignee | ||
Comment 6•5 years ago
|
||
The problem was that classes defined in functions can't be recreated in
child processes. So we need to make the classes global instead.
| Assignee | ||
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
| Assignee | ||
Comment 9•5 years ago
|
||
| Assignee | ||
Comment 10•5 years ago
|
||
| Assignee | ||
Comment 11•5 years ago
|
||
| Assignee | ||
Comment 12•5 years ago
|
||
The change in behaviour of the gc in Python 3 means that del is
being called in cases where it previously wasn't, and this can have
unfortunate side effects where del is being used to clean up
resources.
In particular with web-platform-tests running on Android, we end up
closing the test application unexpectedly. That causes widespread test
failures.
In general using del for this kind of cleanup is problematic
because it's not defined exactly when, or if, it's called. It's much
better to require explcit cleanup (and better still to make that
scope-based, using a context manager, although this patch doesn't do
so).
Therefore we add an option to only do explicit cleanup. This is
currently opt-in to make the breakage as small as possible, but
ultimately ought to be the default and only behaviour. We also change
the wpt android runner to use this behaviour.
Comment 13•5 years ago
|
||
Comment on attachment 9192219 [details]
Bug 1678663 - Fix use of iteritems in WebDriver helpers,
Revision D99253 was moved to bug 1680114. Setting attachment 9192219 [details] to obsolete.
| Assignee | ||
Comment 14•5 years ago
|
||
| Assignee | ||
Comment 15•5 years ago
|
||
| Assignee | ||
Comment 16•5 years ago
|
||
Under Python 3 on Windows we sometimes get an OSError which may be a
race with the process exiting. There's not much we can do about
exceptions during shutdown so just ignore them.
| Assignee | ||
Comment 17•5 years ago
|
||
This test was previously stable but seems to run a litle slower in
Python 3 so we see some timeouts. Make the timeout longer so avoid the
failure.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Comment 20•5 years ago
|
||
Backed out aeb183f1c3f04a60f59841de3f0c231bc836b3b0 for causing marionette failures
backout: https://hg.mozilla.org/integration/autoland/rev/dff02098b9a627cce58cbfd8553597833c807456
failure log: https://treeherder.mozilla.org/logviewer?job_id=324458602&repo=autoland&lineNumber=51968
[task 2020-12-14T16:18:44.291Z] 16:18:44 INFO - Failed to gather test failure debug: Process crashed (Exit code: 1) (Reason: [Errno 10054] An existing connection was forcibly closed by the remote host)
[task 2020-12-14T16:18:44.292Z] 16:18:44 ERROR - TEST-UNEXPECTED-ERROR | testing/marionette/harness/marionette_harness/tests/unit/test_crash.py TestCrash.test_crash_chrome_process | NameError: global name 'TimeoutError' is not defined
[task 2020-12-14T16:18:44.292Z] 16:18:44 INFO - Traceback (most recent call last):
[task 2020-12-14T16:18:44.292Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 214, in run
[task 2020-12-14T16:18:44.293Z] 16:18:44 INFO - testMethod()
[task 2020-12-14T16:18:44.293Z] 16:18:44 INFO - File "Z:\task_1607961860\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_crash.py", line 130, in test_crash_chrome_process
[task 2020-12-14T16:18:44.294Z] 16:18:44 INFO - self.assertRaisesRegexp(IOError, "Process crashed", self.crash, parent=True)
[task 2020-12-14T16:18:44.294Z] 16:18:44 INFO - File "c:\mozilla-build\python\lib\unittest\case.py", line 993, in assertRaisesRegexp
[task 2020-12-14T16:18:44.294Z] 16:18:44 INFO - callable_obj(*args, **kwargs)
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - File "Z:\task_1607961860\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_crash.py", line 101, in crash
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - "about:crash{}".format("parent" if parent else "content")
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_driver\marionette.py", line 1510, in navigate
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - self._send_message("WebDriver:Navigate", {"url": url})
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_driver\decorators.py", line 27, in _
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - return func(*args, **kwargs)
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_driver\marionette.py", line 617, in _send_message
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - msg = self.client.request(name, params)
[task 2020-12-14T16:18:44.295Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_driver\transport.py", line 288, in request
[task 2020-12-14T16:18:44.296Z] 16:18:44 INFO - return self.receive()
[task 2020-12-14T16:18:44.296Z] 16:18:44 INFO - File "Z:\task_1607961860\build\venv\lib\site-packages\marionette_driver\transport.py", line 163, in receive
[task 2020-12-14T16:18:44.296Z] 16:18:44 INFO - except (TimeoutError, socket.timeout):
[task 2020-12-14T16:18:44.296Z] 16:18:44 INFO - TEST-INFO took 199ms
Comment 21•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c9931fc09331
https://hg.mozilla.org/mozilla-central/rev/c584e6f853e6
https://hg.mozilla.org/mozilla-central/rev/6d4a8738da36
https://hg.mozilla.org/mozilla-central/rev/4fbd1c323b6d
https://hg.mozilla.org/mozilla-central/rev/e63f988a3d82
https://hg.mozilla.org/mozilla-central/rev/38d6e1fcab14
https://hg.mozilla.org/mozilla-central/rev/4a753391c683
https://hg.mozilla.org/mozilla-central/rev/3ab9b82d7122
https://hg.mozilla.org/mozilla-central/rev/3fdacb63d3c3
https://hg.mozilla.org/mozilla-central/rev/00c401c41d16
https://hg.mozilla.org/mozilla-central/rev/d5afbee022e5
https://hg.mozilla.org/mozilla-central/rev/4967a4a57ab2
https://hg.mozilla.org/mozilla-central/rev/70a2e2a4b156
| Assignee | ||
Comment 22•5 years ago
|
||
Comment 23•5 years ago
|
||
Comment 24•5 years ago
|
||
| bugherder | ||
Comment 28•5 years ago
|
||
Comment 29•5 years ago
|
||
| bugherder | ||
Updated•4 years ago
|
Description
•