twisted_http_server.py should support --port
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Aug 2015 16:36:57 +0000 (16:36 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Aug 2015 16:36:57 +0000 (16:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147771

Reviewed by Chris Dumez.

Added the option. This makes the script more useful on its own.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188128 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py

index 66c95be..a5bcfed 100644 (file)
@@ -1,3 +1,14 @@
+2015-08-07  Ryosuke Niwa  <rniwa@webkit.org>
+
+        twisted_http_server.py should support --port
+        https://bugs.webkit.org/show_bug.cgi?id=147771
+
+        Reviewed by Chris Dumez.
+
+        Added the option. This makes the script more useful on its own.
+
+        * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+
 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] WTF unit tests are timing out in the bots
index ae43eca..97f2848 100644 (file)
@@ -36,10 +36,11 @@ class ServerControl(Resource):
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description='python twisted_http_server.py web_root')
     parser.add_argument('web_root')
+    parser.add_argument('--port', type=int, default=0)
     args = parser.parse_args()
     web_root = static.File(args.web_root)
     serverControl = ServerControl()
     web_root.putChild('shutdown', serverControl)
     web_root.putChild('report', serverControl)
-    reactor.listenTCP(0, server.Site(web_root))
+    reactor.listenTCP(args.port, server.Site(web_root))
     reactor.run()