Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/wptserve.py

Issue 1154373005: Introduce WPTServe for running W3C Blink Layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add executable bit to pass permchecks. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/utils.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 import argparse
3 import os
4
5 import server
6
7 def abs_path(path):
8 return os.path.abspath(path)
9
10
11 def parse_args():
12 parser = argparse.ArgumentParser(description="HTTP server designed for extre me flexibility "
13 "required in testing situations.")
14 parser.add_argument("document_root", action="store", type=abs_path,
15 help="Root directory to serve files from")
16 parser.add_argument("--port", "-p", dest="port", action="store",
17 type=int, default=8000,
18 help="Port number to run server on")
19 parser.add_argument("--host", "-H", dest="host", action="store",
20 type=str, default="127.0.0.1",
21 help="Host to run server on")
22 return parser.parse_args()
23
24
25 def main():
26 args = parse_args()
27 httpd = server.WebTestHttpd(host=args.host, port=args.port,
28 use_ssl=False, certificate=None,
29 doc_root=args.document_root)
30 httpd.start()
31
32 if __name__ == "__main__":
33 main()
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/thirdparty/wpt/wpt/tools/wptserve/wptserve/utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698