Bug 172068

Summary: There should be an easy way to run HTTP/WPT served tests on a browser
Product: WebKit Reporter: youenn fablet <youennf>
Component: Tools / TestsAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, dbates, glenn, lforschler, mike, sam, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews115 for mac-elcapitan none

Description youenn fablet 2017-05-12 22:36:57 PDT
Currently one needs to execute run-webkit-httpd, translate the test filename to an URL and launch a browser.
Once changed, one will often call run-webkit-tests which may conflict with run-webkit-httpd.
Comment 1 youenn fablet 2017-05-14 22:48:35 PDT
Created attachment 310109 [details]
Patch
Comment 2 youenn fablet 2017-05-14 22:54:36 PDT
(In reply to youenn fablet from comment #1)
> Created attachment 310109 [details]
> Patch

Patch is along that workflow:
1. Having a persistent 'run-webkit-httpd -b'
'-b' option is just to open an html page that allows easier access to HTTP served tests

2. Use run-webkit-tests with the '--no-http-servers' option to run layout tests as usual
This option disables the launch of http servers from run-webkit-tests.
This ensures run-webkit-tests does not kill the http servers started by run-webkit-httpd

Another possibility would be to run these servers with different ports.
This is easy with WPT but we would need to change webkitpy infra to stop killing older servers.
This is not as easy for http/tests as some of them are expecting some precise ports.
Comment 3 youenn fablet 2017-05-14 22:54:46 PDT
Any input well appreciated.
Comment 4 Simon Fraser (smfr) 2017-05-15 10:28:56 PDT
Comment on attachment 310109 [details]
Patch

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

> Tools/ChangeLog:8
> +        Adding a '-b' option to run-webkit-httpd to launch an html file that helps run http-served tests on a browser

Could the server just figure out which URL to use given the path to a file in LayoutTests, rather than the user having to navigate through an intermediate file?
Comment 5 youenn fablet 2017-05-15 10:40:26 PDT
CLI-only is fine by me.
How about a new script called open-layout-test?
It would launch run-webkit-httpd if needed, compute the URL from the filename and open it in the default browser.
Comment 6 youenn fablet 2017-05-21 20:19:32 PDT
Created attachment 310828 [details]
Patch
Comment 7 Build Bot 2017-05-21 21:45:55 PDT
Comment on attachment 310828 [details]
Patch

Attachment 310828 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/3792076

New failing tests:
imported/w3c/web-platform-tests/media-source/mediasource-buffered.html
Comment 8 Build Bot 2017-05-21 21:45:57 PDT
Created attachment 310834 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 9 Sam Weinig 2017-05-22 17:50:33 PDT
Very nice. I'd love a way (and argument presumably) to specify an alternate browser to use, probably by path.
Comment 10 Sam Weinig 2017-05-22 17:52:07 PDT
We should also figure out if we can work this functionality into any of the bisection tools. So if you are bisecting a layout test...boom!
Comment 11 youenn fablet 2017-05-23 08:33:01 PDT
(In reply to Sam Weinig from comment #9)
> Very nice. I'd love a way (and argument presumably) to specify an alternate
> browser to use, probably by path.

Sounds ok.

(In reply to Sam Weinig from comment #10)
> We should also figure out if we can work this functionality into any of the
> bisection tools. So if you are bisecting a layout test...boom!

Is there no integration between bisection tools and rwt?
If not, I agree it would be nice.
Comment 12 WebKit Commit Bot 2017-05-23 08:56:16 PDT
Comment on attachment 310828 [details]
Patch

Clearing flags on attachment: 310828

Committed r217276: <http://trac.webkit.org/changeset/217276>
Comment 13 WebKit Commit Bot 2017-05-23 08:56:17 PDT
All reviewed patches have been landed.  Closing bug.