Title: [87075] trunk/Tools
- Revision
- 87075
- Author
- [email protected]
- Date
- 2011-05-23 09:05:35 -0700 (Mon, 23 May 2011)
Log Message
2011-05-23 Patrick Gansterer <[email protected]>
Reviewed by Adam Barth.
Move generation of shell_command from port to executive
https://bugs.webkit.org/show_bug.cgi?id=61251
After move it's possible to use the code in other places too.
* Scripts/webkitpy/common/config/ports.py:
* Scripts/webkitpy/common/system/executive.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (87074 => 87075)
--- trunk/Tools/ChangeLog 2011-05-23 15:07:47 UTC (rev 87074)
+++ trunk/Tools/ChangeLog 2011-05-23 16:05:35 UTC (rev 87075)
@@ -1,3 +1,15 @@
+2011-05-23 Patrick Gansterer <[email protected]>
+
+ Reviewed by Adam Barth.
+
+ Move generation of shell_command from port to executive
+ https://bugs.webkit.org/show_bug.cgi?id=61251
+
+ After move it's possible to use the code in other places too.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ * Scripts/webkitpy/common/system/executive.py:
+
2011-05-23 Qi Zhang <[email protected]>
Reviewed by Darin Adler.
Modified: trunk/Tools/Scripts/webkitpy/common/config/ports.py (87074 => 87075)
--- trunk/Tools/Scripts/webkitpy/common/config/ports.py 2011-05-23 15:07:47 UTC (rev 87074)
+++ trunk/Tools/Scripts/webkitpy/common/config/ports.py 2011-05-23 16:05:35 UTC (rev 87075)
@@ -45,12 +45,7 @@
@classmethod
def script_shell_command(cls, script_name):
script_path = cls.script_path(script_name)
- # Win32 does not support shebang. We need to detect the interpreter ourself.
- if sys.platform == 'win32':
- interpreter = Executive.interpreter_for_script(script_path)
- if interpreter:
- return [interpreter, script_path]
- return [script_path]
+ return Executive.shell_command_for_script(script_path)
@staticmethod
def port(port_name):
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive.py (87074 => 87075)
--- trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-05-23 15:07:47 UTC (rev 87074)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-05-23 16:05:35 UTC (rev 87075)
@@ -196,6 +196,15 @@
return 'ruby'
return None
+ @staticmethod
+ def shell_command_for_script(script_path, fs=FileSystem()):
+ # Win32 does not support shebang. We need to detect the interpreter ourself.
+ if sys.platform == 'win32':
+ interpreter = Executive.interpreter_for_script(script_path, fs)
+ if interpreter:
+ return [interpreter, script_path]
+ return [script_path]
+
def kill_process(self, pid):
"""Attempts to kill the given pid.
Will fail silently if pid does not exist or insufficient permisssions."""
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes