Changeset 202780 in webkit


Ignore:
Timestamp:
Jul 2, 2016 10:45:57 AM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Make it straightforward to start the Web Platform Tests HTTP server using run-webkit-httpd
https://bugs.webkit.org/show_bug.cgi?id=152486

Patch by Youenn Fablet <youennf@gmail.com> on 2016-07-02
Reviewed by Daniel Bates.

Add launch of web-platform-tests server by run-webkit-httpd.
Add two options to disable starting httpd and web-platform-tests servers.

  • Scripts/run-webkit-httpd:

(parse_args):
(main):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r202772 r202780  
     12016-07-02  Youenn Fablet  <youennf@gmail.com>
     2
     3        Make it straightforward to start the Web Platform Tests HTTP server using run-webkit-httpd
     4        https://bugs.webkit.org/show_bug.cgi?id=152486
     5
     6        Reviewed by Daniel Bates.
     7
     8        Add launch of web-platform-tests server by run-webkit-httpd.
     9        Add two options to disable starting httpd and web-platform-tests servers.
     10
     11        * Scripts/run-webkit-httpd:
     12        (parse_args):
     13        (main):
     14
    1152016-07-01  Myles C. Maxfield  <mmaxfield@apple.com>
    216
  • trunk/Tools/Scripts/run-webkit-httpd

    r201404 r202780  
    3636
    3737from webkitpy.common.host import Host
     38from webkitpy.layout_tests.servers import web_platform_test_server
    3839from webkitpy.port import platform_options
    3940
     
    4243    parser.add_option("-a", "--all-interfaces", help="Bind to all interfaces", action="store_true", dest="http_all_interfaces")
    4344    parser.add_option("-p", "--port", help="Bind to port NNNN", action="store", type="int", dest="http_port")
     45    parser.add_option("--no-httpd", help="Do not start httpd server", action="store_false", default=True, dest="httpd_server")
     46    parser.add_option("--no-wpt", help="Do not start web-platform-tests server", action="store_false", default=True, dest="web_platform_test_server")
    4447    return parser.parse_args(args)
    4548
     
    5962        return EXCEPTIONAL_EXIT_STATUS
    6063
    61     # FIXME(154294): somehow retrieve the actual ports and interfaces bound by the httpd server
    62     http_port = options.http_port if options.http_port is not None else "8000"
    63     if options.http_all_interfaces is not None:
    64         print "Starting httpd on port %s (all interfaces)" % http_port
    65     else:
    66         print "Starting httpd on <http://127.0.0.1:%s>" % http_port
     64    if options.web_platform_test_server:
     65        print "Starting web-platform-tests server on <%s>" % web_platform_test_server.base_url(port)
     66        port.start_web_platform_test_server()
    6767
    68     port.start_http_server()
    69     port.start_websocket_server()
     68    if options.httpd_server:
     69        # FIXME(154294): somehow retrieve the actual ports and interfaces bound by the httpd server
     70        http_port = options.http_port if options.http_port is not None else "8000"
     71        if options.http_all_interfaces is not None:
     72            print "Starting httpd on port %s (all interfaces)" % http_port
     73        else:
     74            print "Starting httpd on <http://127.0.0.1:%s>" % http_port
     75
     76        port.start_http_server()
     77        port.start_websocket_server()
    7078
    7179    try:
     
    7482            sys.stdout.write(tail.stdout.readline())
    7583    except KeyboardInterrupt:
    76         port.stop_websocket_server()
    77         port.stop_http_server()
     84        if options.web_platform_test_server:
     85            port.stop_web_platform_test_server()
     86        if options.httpd_server:
     87            port.stop_websocket_server()
     88            port.stop_http_server()
     89
    7890
    7991if __name__ == '__main__':
Note: See TracChangeset for help on using the changeset viewer.