Hardcoded python path is not compatible with virtual environment.
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Dec 2017 01:56:40 +0000 (01:56 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Dec 2017 01:56:40 +0000 (01:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=180300

Reviewed by Stephanie Lewis.

Hardcoding '/usr/bin/python' does not work with python virtual environment.
Use 'python' instead.

* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
(SimpleHTTPServerDriver.serve):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py

index 4d3dabb..61beeef 100644 (file)
@@ -1,3 +1,16 @@
+2017-12-01  Dewei Zhu  <dewei_zhu@apple.com>
+
+        Hardcoded python path is not compatible with virtual environment.
+        https://bugs.webkit.org/show_bug.cgi?id=180300
+
+        Reviewed by Stephanie Lewis.
+
+        Hardcoding '/usr/bin/python' does not work with python virtual environment.
+        Use 'python' instead.
+
+        * Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py:
+        (SimpleHTTPServerDriver.serve):
+
 2017-12-01  Aakash Jain  <aakash_jain@apple.com>
 
         [build.webkit.org] Move python code to load config from master.cfg in separate file
index 08b8254..6b68094 100644 (file)
@@ -30,7 +30,7 @@ class SimpleHTTPServerDriver(HTTPServerDriver):
     def serve(self, web_root):
         _log.info('Launching an http server')
         http_server_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "http_server/twisted_http_server.py")
-        self._server_process = subprocess.Popen(["/usr/bin/python", http_server_path, web_root], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        self._server_process = subprocess.Popen(["python", http_server_path, web_root], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
         max_attempt = 5
         interval = 0.5