Add twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 01:52:02 +0000 (01:52 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Mar 2016 01:52:02 +0000 (01:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154667

Reviewed by Ryosuke Niwa and Simon Fraser.

Add twisted-15.5.0 to webkitpy.thirdparty.autoinstalled.
Minor fix for twsited_http_server used by run-benchmark that we should only stop http server while recieving 'GET /shutdown'.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST): Deleted.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_twisted_15_5_0):
* Scripts/webkitpy/thirdparty/__init___unittest.py:
(ThirdpartyTest.test_imports):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py
Tools/Scripts/webkitpy/thirdparty/__init__.py
Tools/Scripts/webkitpy/thirdparty/__init___unittest.py

index 355fd35..1cb5c48 100644 (file)
@@ -1,3 +1,21 @@
+2016-03-14  Dewei Zhu  <dewei_zhu@apple.com>
+
+        Add twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
+        https://bugs.webkit.org/show_bug.cgi?id=154667
+
+        Reviewed by Ryosuke Niwa and Simon Fraser.
+
+        Add twisted-15.5.0 to webkitpy.thirdparty.autoinstalled.
+        Minor fix for twsited_http_server used by run-benchmark that we should only stop http server while recieving 'GET /shutdown'.
+
+        * Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
+        (ServerControl.render_POST): Deleted.
+        * Scripts/webkitpy/thirdparty/__init__.py:
+        (AutoinstallImportHook.find_module):
+        (AutoinstallImportHook._install_twisted_15_5_0):
+        * Scripts/webkitpy/thirdparty/__init___unittest.py:
+        (ThirdpartyTest.test_imports):
+
 2016-03-14  Mark Lam  <mark.lam@apple.com>
 
         Need to distinguish between Symbol() and Symbol("").
index 97f2848..c5c0271 100644 (file)
@@ -9,7 +9,7 @@ try:
     import twisted
 except ImportError:
     sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../..')))
-    from webkitpy.thirdparty.autoinstalled.twisted import twisted
+    from webkitpy.thirdparty.autoinstalled.twisted_15_5_0 import twisted
 
 from twisted.web import static, server
 from twisted.web.resource import Resource
@@ -29,7 +29,6 @@ class ServerControl(Resource):
         _log.info("Serving request %s" % request)
         sys.stdout.write(request.content.getvalue())
         sys.stdout.flush()
-        reactor.stop()
         return 'OK'
 
 
index f43c3ac..557c4b6 100644 (file)
@@ -91,6 +91,8 @@ class AutoinstallImportHook(object):
             self._install_buildbot()
         elif '.keyring' in fullname:
             self._install_keyring()
+        elif '.twisted_15_5_0' in fullname:
+            self._install_twisted_15_5_0()
         elif '.twisted' in fullname:
             self._install_twisted()
 
@@ -155,6 +157,11 @@ class AutoinstallImportHook(object):
         installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir)
         installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-12.1.0.tar.bz2#md5=f396f1d6f5321e869c2f89b2196a9eb5", url_subpath="Twisted-12.1.0/twisted")
 
+    def _install_twisted_15_5_0(self):
+        twisted_dir = self._fs.join(_AUTOINSTALLED_DIR, "twisted_15_5_0")
+        installer = AutoInstaller(prepend_to_search_path=True, target_dir=twisted_dir)
+        installer.install(url="https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.bz2#md5=0831d7c90d0020062de0f7287530a285", url_subpath="Twisted-15.5.0/twisted")
+
     def _install(self, url, url_subpath=None, target_name=None):
         installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
         installer.install(url=url, url_subpath=url_subpath, target_name=target_name)
index a88f618..c9f4b50 100644 (file)
@@ -64,3 +64,5 @@ class ThirdpartyTest(unittest.TestCase):
         import webkitpy.thirdparty.autoinstalled.mechanize
         import webkitpy.thirdparty.autoinstalled.pylint
         import webkitpy.thirdparty.autoinstalled.pep8
+        import webkitpy.thirdparty.autoinstalled.twisted
+        import webkitpy.thirdparty.autoinstalled.twisted_15_5_0