WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
203701
Python 3: Add support in webkitpy.layout_tests
https://bugs.webkit.org/show_bug.cgi?id=203701
Summary
Python 3: Add support in webkitpy.layout_tests
Jonathan Bedard
Reported
2019-10-31 16:16:26 PDT
Work towards allowing run-webkit-tests to be run with Python3.
Attachments
Patch
(1.33 KB, patch)
2021-01-27 08:39 PST
,
Jonathan Bedard
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2021-01-27 07:30:23 PST
***
Bug 210699
has been marked as a duplicate of this bug. ***
Michael Catanzaro
Comment 2
2021-01-27 07:34:39 PST
From
bug #210699
: $ ./Tools/Scripts/run-webkit-tests --verbose --debug LayoutTests/fast/css/getComputedStyle/computed-style.html Using port 'gtk-wk2' Test configuration: <, x86, debug> Placing test results in /home/emilio/src/WebKit/WebKitBuild/Debug/layout-test-results Using Debug build Pixel tests disabled Regular timeout: 30000, slow test timeout: 150000 Command line: /home/emilio/src/WebKit/WebKitBuild/Debug/bin/WebKitTestRunner - Found 1 test; running 1, skipping 0. Verbose baseline search path: platform/gtk -> platform/wk2 -> generic Baseline search path: platform/gtk -> platform/wk2 -> generic Running 1 test Checking system dependencies ... TypeError raised: argument should be integer or bytes-like object, not 'str' Traceback (most recent call last): File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 91, in main run_details = run(port, options, args, stderr) File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 487, in run run_details = manager.run(args) File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 270, in run if not self._set_up_run(tests_to_run_by_device[device_type], device_type=device_type): File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 176, in _set_up_run self._port.setup_test_run(device_type) File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/gtk.py", line 108, in setup_test_run self._pulseaudio_sanitizer.unload_pulseaudio_module() File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py", line 58, in unload_pulseaudio_module if module.find("module-stream-restore") >= 0: TypeError: argument should be integer or bytes-like object, not 'str'
Jonathan Bedard
Comment 3
2021-01-27 07:53:45 PST
Not a code-path (In reply to Michael Catanzaro from
comment #2
)
> From
bug #210699
: > > $ ./Tools/Scripts/run-webkit-tests --verbose --debug > LayoutTests/fast/css/getComputedStyle/computed-style.html > > Using port 'gtk-wk2' > Test configuration: <, x86, debug> > Placing test results in > /home/emilio/src/WebKit/WebKitBuild/Debug/layout-test-results > Using Debug build > Pixel tests disabled > Regular timeout: 30000, slow test timeout: 150000 > Command line: /home/emilio/src/WebKit/WebKitBuild/Debug/bin/WebKitTestRunner > - > > Found 1 test; running 1, skipping 0. > > Verbose baseline search path: platform/gtk -> platform/wk2 -> generic > > Baseline search path: platform/gtk -> platform/wk2 -> generic > > Running 1 test > > Checking system dependencies ... > TypeError raised: argument should be integer or bytes-like object, not 'str' > Traceback (most recent call last): > File > "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/ > run_webkit_tests.py", line 91, in main > run_details = run(port, options, args, stderr) > File > "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/ > run_webkit_tests.py", line 487, in run > run_details = manager.run(args) > File > "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/ > manager.py", line 270, in run > if not self._set_up_run(tests_to_run_by_device[device_type], > device_type=device_type): > File > "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/ > manager.py", line 176, in _set_up_run > self._port.setup_test_run(device_type) > File "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/gtk.py", line > 108, in setup_test_run > self._pulseaudio_sanitizer.unload_pulseaudio_module() > File > "/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer. > py", line 58, in unload_pulseaudio_module > if module.find("module-stream-restore") >= 0: > TypeError: argument should be integer or bytes-like object, not 'str'
I don't have a machine which exercises this code path, the fix is not likely to be difficult, but it's also likely there are multiple encoding problems in that class.
Philippe Normand
Comment 4
2021-01-27 07:54:16 PST
If that's the only issue, the fix is easy. I'll check it.
Jonathan Bedard
Comment 5
2021-01-27 08:39:05 PST
Created
attachment 418548
[details]
Patch
Jonathan Bedard
Comment 6
2021-01-27 08:42:24 PST
(In reply to Jonathan Bedard from
comment #5
)
> Created
attachment 418548
[details]
> Patch
That's a blind fix for the raised exception
Philippe Normand
Comment 7
2021-04-02 05:11:35 PDT
bug 223888
removes that pulseaudio thing BTW :)
Philippe Normand
Comment 8
2021-04-28 09:07:36 PDT
What's the status here? Just trying now to run the WPE layout tests in Python3, the test harness no longer spits a traceback and tests actually seem to run.
Jonathan Bedard
Comment 9
2021-04-28 09:37:05 PDT
(In reply to Philippe Normand from
comment #8
)
> What's the status here? > > Just trying now to run the WPE layout tests in Python3, the test harness no > longer spits a traceback and tests actually seem to run.
The test runner works in 3.7, still has some issues in 3.8 which I will be working on this week and next (issues are about forking)
Philippe Normand
Comment 10
2021-04-28 09:48:13 PDT
Here in linux with python 3.8.7 the only issue I noticed so far was that tests expected to time out were detected as unexpected timeouts.
Radar WebKit Bug Importer
Comment 11
2021-04-29 08:04:32 PDT
<
rdar://problem/77321491
>
Sam Sneddon [:gsnedders]
Comment 12
2021-04-29 08:09:53 PDT
(In reply to Jonathan Bedard from
comment #9
)
> (In reply to Philippe Normand from
comment #8
) > > What's the status here? > > > > Just trying now to run the WPE layout tests in Python3, the test harness no > > longer spits a traceback and tests actually seem to run. > > The test runner works in 3.7, still has some issues in 3.8 which I will be > working on this week and next (issues are about forking)
Note that the change of the multiprocessing default start method in 3.8 was only on macOS; non-macOS Unix systems still use the fork start method, and Windows has for a long time used the spawn start method. As such, as Philippe says, I would be surprised by changes in behaviour between 3.7 and 3.8 on Linux. Also, given the WinCairo test bot isn't totally broken, presumably whatever is causing issues with the spawn start method is something related to the Darwin ports?
Philippe Normand
Comment 13
2021-06-28 04:37:06 PDT
Python2 is still used for the WebSocket server. WIP patch in
bug 222188
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug