Bug 229253 - Add a new option '--show-window' to run-webkit-tests
Summary: Add a new option '--show-window' to run-webkit-tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks: 232059
  Show dependency treegraph
 
Reported: 2021-08-18 14:56 PDT by Peng Liu
Modified: 2021-10-25 17:46 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.72 KB, patch)
2021-08-18 15:19 PDT, Peng Liu
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Revise the patch based on Simon's comment (3.69 KB, patch)
2021-08-18 15:48 PDT, Peng Liu
no flags Details | Formatted Diff | Diff
Revise the patch based on Alexey's comment (9.31 KB, patch)
2021-08-19 10:27 PDT, Peng Liu
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Fix build failures on the win bot (10.09 KB, patch)
2021-08-19 11:41 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2021-08-18 14:56:32 PDT
Add a new option '--show-webview' to run-webkit-tests
Comment 1 Peng Liu 2021-08-18 15:19:54 PDT
Created attachment 435805 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-08-18 15:29:12 PDT
Comment on attachment 435805 [details]
Patch

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

> Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:343
> +        optparse.make_option('--show-window', action="store_true", default=False, help="If set, a window (with webview) will show up. Helpful for debugging some tests."),

I think the help should say "Make the test runner window visible during testing"
Comment 3 Peng Liu 2021-08-18 15:48:38 PDT
Created attachment 435809 [details]
Revise the patch based on Simon's comment
Comment 4 Peng Liu 2021-08-18 15:50:14 PDT
Comment on attachment 435805 [details]
Patch

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

>> Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:343
>> +        optparse.make_option('--show-window', action="store_true", default=False, help="If set, a window (with webview) will show up. Helpful for debugging some tests."),
> 
> I think the help should say "Make the test runner window visible during testing"

Fixed. Thanks!
Comment 5 Jonathan Bedard 2021-08-18 15:54:20 PDT
Comment on attachment 435809 [details]
Revise the patch based on Simon's comment

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

> Tools/WebKitTestRunner/Options.cpp:169
> +    optionList.append(Option("--show-window", "Show the WebView during test runs (for debugging)", handleOptionShowWebView));

Why add the new option here instead of just passing --show-webview in the options? If we wanted to keep the option and name aligned, when creating the option, we could do this:

optparse.make_option('--show-window', '--show-webview', dest='show_webview', ...)

which would make the option inside webkitpy 'show_webview', but the option '--show-window' with an alias '--show-webview'
Comment 6 Peng Liu 2021-08-18 16:04:21 PDT
Comment on attachment 435809 [details]
Revise the patch based on Simon's comment

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

>> Tools/WebKitTestRunner/Options.cpp:169
>> +    optionList.append(Option("--show-window", "Show the WebView during test runs (for debugging)", handleOptionShowWebView));
> 
> Why add the new option here instead of just passing --show-webview in the options? If we wanted to keep the option and name aligned, when creating the option, we could do this:
> 
> optparse.make_option('--show-window', '--show-webview', dest='show_webview', ...)
> 
> which would make the option inside webkitpy 'show_webview', but the option '--show-window' with an alias '--show-webview'

The original plan was to use `--show-window` instead of `--show-webview` in both run-webkit-tests and WebKitTestRunner , and Simon suggested to add an alias.
Comment 7 Alexey Proskuryakov 2021-08-18 17:01:26 PDT
I don't have a string opinion about which name to use, but having two options with identical descriptions is super confusing.

If you do this, please change the description to something like "DEPRECATED. Same as --show-window".
Comment 8 Peng Liu 2021-08-19 10:27:54 PDT
Created attachment 435880 [details]
Revise the patch based on Alexey's comment
Comment 9 Peng Liu 2021-08-19 11:41:36 PDT
Created attachment 435889 [details]
Fix build failures on the win bot
Comment 10 Peng Liu 2021-08-23 11:26:01 PDT
(In reply to Alexey Proskuryakov from comment #7)
> I don't have a string opinion about which name to use, but having two
> options with identical descriptions is super confusing.
> 
> If you do this, please change the description to something like "DEPRECATED.
> Same as --show-window".

Agree! Fixed.
Comment 11 EWS 2021-08-23 12:04:32 PDT
Committed r281461 (240840@main): <https://commits.webkit.org/240840@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435889 [details].
Comment 12 Radar WebKit Bug Importer 2021-08-23 12:05:22 PDT
<rdar://problem/82255475>