summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/common
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Scripts/webkitpy/common')
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py4
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive.py9
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive_unittest.py37
3 files changed, 29 insertions, 21 deletions
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 4a55d495c..efa5aac89 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -113,6 +113,7 @@ contributors_who_are_not_committers = [
Contributor("Alexandre Elias", "aelias@chromium.org"),
Contributor("Alexey Marinichev", ["amarinichev@chromium.org", "amarinichev@google.com"], "amarinichev"),
Contributor("Andras Piroska", "pandras@inf.u-szeged.hu", "andris88"),
+ Contributor("Andrei Bucur", "abucur@adobe.com", "abucur"),
Contributor("Anne van Kesteren", "annevankesteren+webkit@gmail.com", "annevk"),
Contributor("Annie Sullivan", "sullivan@chromium.org", "annie"),
Contributor("Aryeh Gregor", "ayg@aryeh.name", "AryehGregor"),
@@ -142,12 +143,15 @@ contributors_who_are_not_committers = [
Contributor("John Mellor", "johnme@chromium.org"),
Contributor("Kulanthaivel Palanichamy", "kulanthaivel@codeaurora.org", "kvel"),
Contributor(u"Michael Br\u00fcning", "michael.bruning@nokia.com", "mibrunin"),
+ Contributor("Mihai Balan", "mibalan@adobe.com", "miChou"),
Contributor("Min Qin", "qinmin@chromium.org"),
Contributor("Nandor Huszka", "hnandor@inf.u-szeged.hu", "hnandor"),
Contributor("Oliver Varga", ["voliver@inf.u-szeged.hu", "Varga.Oliver@stud.u-szeged.hu"], "TwistO"),
Contributor("Peter Gal", "galpeter@inf.u-szeged.hu", "elecro"),
Contributor("Peter Linss", "peter.linss@hp.com", "plinss"),
+ Contributor("Pravin D", "pravind.2k4@gmail.com", 'pravind'),
Contributor("Radar WebKit Bug Importer", "webkit-bug-importer@group.apple.com"),
+ Contributor("Raul Hudea", "rhudea@adobe.com", "rhudea"),
Contributor("Roland Takacs", "rtakacs@inf.u-szeged.hu", "rtakacs"),
Contributor("Szilard Ledan-Muntean", "szledan@inf.u-szeged.hu", "szledan"),
Contributor("Tab Atkins", ["tabatkins@google.com", "jackalmage@gmail.com"], "tabatkins"),
diff --git a/Tools/Scripts/webkitpy/common/system/executive.py b/Tools/Scripts/webkitpy/common/system/executive.py
index cb36b5dc0..1099e07fb 100644
--- a/Tools/Scripts/webkitpy/common/system/executive.py
+++ b/Tools/Scripts/webkitpy/common/system/executive.py
@@ -27,10 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import multiprocessing
-import ctypes
import errno
import logging
+import multiprocessing
import os
import StringIO
import signal
@@ -211,12 +210,18 @@ class Executive(object):
continue
if e.errno == errno.ESRCH: # The process does not exist.
return
+ if e.errno == errno.EPIPE: # The process has exited already on cygwin
+ return
if e.errno == errno.ECHILD:
# Can't wait on a non-child process, but the kill worked.
return
raise
def _win32_check_running_pid(self, pid):
+ # importing ctypes at the top-level seems to cause weird crashes at
+ # exit under cygwin on apple's win port. Only win32 needs cygwin, so
+ # we import it here instead. See https://bugs.webkit.org/show_bug.cgi?id=91682
+ import ctypes
class PROCESSENTRY32(ctypes.Structure):
_fields_ = [("dwSize", ctypes.c_ulong),
diff --git a/Tools/Scripts/webkitpy/common/system/executive_unittest.py b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
index 212896a4a..c041b6372 100644
--- a/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
+import errno
import signal
import subprocess
import sys
@@ -77,8 +78,6 @@ def command_line(cmd, *args):
class ExecutiveTest(unittest.TestCase):
def assert_interpreter_for_content(self, intepreter, content):
fs = MockFileSystem()
- file_path = None
- file_interpreter = None
tempfile, temp_name = fs.open_binary_tempfile('')
tempfile.write(content)
@@ -166,26 +165,12 @@ class ExecutiveTest(unittest.TestCase):
else:
expected_exit_code = -signal.SIGKILL
self.assertEqual(process.wait(), expected_exit_code)
+
# Killing again should fail silently.
executive.kill_process(process.pid)
- def _assert_windows_image_name(self, name, expected_windows_name):
- executive = Executive()
- windows_name = executive._windows_image_name(name)
- self.assertEqual(windows_name, expected_windows_name)
-
- def test_windows_image_name(self):
- self._assert_windows_image_name("foo", "foo.exe")
- self._assert_windows_image_name("foo.exe", "foo.exe")
- self._assert_windows_image_name("foo.com", "foo.com")
- # If the name looks like an extension, even if it isn't
- # supposed to, we have no choice but to return the original name.
- self._assert_windows_image_name("foo.baz", "foo.baz")
- self._assert_windows_image_name("foo.baz.exe", "foo.baz.exe")
-
- def test_kill_all(self):
- executive = Executive()
- # We use "yes" because it loops forever.
+ # Now test kill_all ; we do this in the same test as kill
+ # so that we don't collide when running tests in parallel.
process = subprocess.Popen(never_ending_command(), stdout=subprocess.PIPE)
self.assertEqual(process.poll(), None) # Process is running
executive.kill_all(never_ending_command()[0])
@@ -203,6 +188,20 @@ class ExecutiveTest(unittest.TestCase):
# Killing again should fail silently.
executive.kill_all(never_ending_command()[0])
+ def _assert_windows_image_name(self, name, expected_windows_name):
+ executive = Executive()
+ windows_name = executive._windows_image_name(name)
+ self.assertEqual(windows_name, expected_windows_name)
+
+ def test_windows_image_name(self):
+ self._assert_windows_image_name("foo", "foo.exe")
+ self._assert_windows_image_name("foo.exe", "foo.exe")
+ self._assert_windows_image_name("foo.com", "foo.com")
+ # If the name looks like an extension, even if it isn't
+ # supposed to, we have no choice but to return the original name.
+ self._assert_windows_image_name("foo.baz", "foo.baz")
+ self._assert_windows_image_name("foo.baz.exe", "foo.baz.exe")
+
def test_check_running_pid(self):
executive = Executive()
self.assertTrue(executive.check_running_pid(os.getpid()))