summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py')
-rw-r--r--chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py35
1 files changed, 4 insertions, 31 deletions
diff --git a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
index b0717aae61c..415631688cb 100644
--- a/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+++ b/chromium/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_unittest.py
@@ -166,45 +166,18 @@ class ExecutiveTest(unittest.TestCase):
self.assertEqual(output, encoded_tor)
def serial_test_kill_process(self):
+ if sys.platform in ("win32", "cygwin"):
+ return # Windows does not return consistent exit codes.
+
executive = Executive()
process = subprocess.Popen(never_ending_command(), stdout=subprocess.PIPE)
self.assertEqual(process.poll(), None) # Process is running
executive.kill_process(process.pid)
- # Note: Can't use a ternary since signal.SIGKILL is undefined for sys.platform == "win32"
- if sys.platform == "win32":
- # FIXME: https://bugs.webkit.org/show_bug.cgi?id=54790
- # We seem to get either 0 or 1 here for some reason.
- self.assertIn(process.wait(), (0, 1))
- elif sys.platform == "cygwin":
- # FIXME: https://bugs.webkit.org/show_bug.cgi?id=98196
- # cygwin seems to give us either SIGABRT or SIGKILL
- self.assertIn(process.wait(), (-signal.SIGABRT, -signal.SIGKILL))
- else:
- expected_exit_code = -signal.SIGKILL
- self.assertEqual(process.wait(), expected_exit_code)
+ self.assertEqual(process.wait(), -signal.SIGKILL)
# Killing again should fail silently.
executive.kill_process(process.pid)
- def serial_test_kill_all(self):
- executive = Executive()
- process = subprocess.Popen(never_ending_command(), stdout=subprocess.PIPE)
- self.assertIsNone(process.poll()) # Process is running
- executive.kill_all(never_ending_command()[0])
- # Note: Can't use a ternary since signal.SIGTERM is undefined for sys.platform == "win32"
- if sys.platform == "cygwin":
- expected_exit_code = 0 # os.kill results in exit(0) for this process.
- self.assertEqual(process.wait(), expected_exit_code)
- elif sys.platform == "win32":
- # FIXME: https://bugs.webkit.org/show_bug.cgi?id=54790
- # We seem to get either 0 or 1 here for some reason.
- self.assertIn(process.wait(), (0, 1))
- else:
- expected_exit_code = -signal.SIGTERM
- self.assertEqual(process.wait(), expected_exit_code)
- # 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)