Bug 225221

Summary: [run-api-tests] Use webkitcorepy's TaskPool
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: dewei_zhu, ews-watchlist, glenn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225220
https://bugs.webkit.org/show_bug.cgi?id=225230
https://bugs.webkit.org/show_bug.cgi?id=225311
https://bugs.webkit.org/show_bug.cgi?id=225361
https://bugs.webkit.org/show_bug.cgi?id=217680
https://bugs.webkit.org/show_bug.cgi?id=225427
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch for landing none

Description Jonathan Bedard 2021-04-29 17:29:30 PDT
In order for run-api-tests to support Python 3.8 on Apple's platforms, we need run-api-tests to use webkitcorepy's TaskPool.
Comment 1 Radar WebKit Bug Importer 2021-04-29 17:30:02 PDT
<rdar://problem/77352465>
Comment 2 Jonathan Bedard 2021-05-03 17:12:40 PDT
Created attachment 427625 [details]
Patch
Comment 3 Jonathan Bedard 2021-05-04 15:37:25 PDT
Created attachment 427703 [details]
Patch
Comment 4 Jonathan Bedard 2021-05-05 08:46:45 PDT
Created attachment 427768 [details]
Patch
Comment 5 Jonathan Bedard 2021-05-05 10:53:16 PDT
Created attachment 427780 [details]
Patch
Comment 6 dewei_zhu 2021-05-05 15:06:06 PDT
Comment on attachment 427780 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=427780&action=review

> Tools/Scripts/webkitpy/api_tests/runner.py:225
> +    if status == Runner.STATUS_PASSED and not output and Runner.instance.port.get_option('quiet'):
> +        Runner.instance.printer.write_update('{} {} {}'.format(worker, test, Runner.NAME_FOR_STATUS[status]))
> +    else:
> +        Runner.instance.printer.write_update('{} {} {}'.format(worker, test, Runner.NAME_FOR_STATUS[status]))

Are those expected to be identical?

> Tools/Scripts/webkitpy/api_tests/runner.py:233
> +class Runner(object):

Moving Runner to the bottom of this file make it more difficult to compare if we made any change to this class. Maybe move it back?
Comment 7 Jonathan Bedard 2021-05-05 15:46:50 PDT
Created attachment 427816 [details]
Patch
Comment 8 dewei_zhu 2021-05-05 16:39:42 PDT
Comment on attachment 427816 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=427816&action=review

r=me

> Tools/ChangeLog:18
> +        (_Worker.setup): Pass port object to worker process.
> +        (_Worker.setup): Pass port object to worker process.

Nit: those two lines are identical, we only need one, right?

> Tools/Scripts/webkitpy/api_tests/runner.py:118
> +            Runner.instance = self

Discussed in person, let's add an assertion that `Runner.instance is None` before this assignment.
Comment 9 Jonathan Bedard 2021-05-05 16:55:57 PDT
Created attachment 427822 [details]
Patch for landing
Comment 10 EWS 2021-05-05 17:22:22 PDT
Committed r277061 (237367@main): <https://commits.webkit.org/237367@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427822 [details].