Title: [123173] trunk/Tools
Revision
123173
Author
[email protected]
Date
2012-07-19 21:23:05 -0700 (Thu, 19 Jul 2012)

Log Message

webkitpy: executive_unittest still failing when run in parallel
https://bugs.webkit.org/show_bug.cgi?id=91795

Reviewed by Adam Barth.

It turns out that test_kill_process and test_kill_all are both
launching the same process, and so if they're run at the same
time, test_kill_all interferes w/ test_kill_process.

Merging the two tests solves the issue :).

* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_kill_process):
(ExecutiveTest._assert_windows_image_name):
(ExecutiveTest):
(ExecutiveTest.test_windows_image_name):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (123172 => 123173)


--- trunk/Tools/ChangeLog	2012-07-20 04:08:16 UTC (rev 123172)
+++ trunk/Tools/ChangeLog	2012-07-20 04:23:05 UTC (rev 123173)
@@ -1,3 +1,22 @@
+2012-07-19  Dirk Pranke  <[email protected]>
+
+        webkitpy: executive_unittest still failing when run in parallel
+        https://bugs.webkit.org/show_bug.cgi?id=91795
+
+        Reviewed by Adam Barth.
+
+        It turns out that test_kill_process and test_kill_all are both
+        launching the same process, and so if they're run at the same
+        time, test_kill_all interferes w/ test_kill_process.
+
+        Merging the two tests solves the issue :).
+
+        * Scripts/webkitpy/common/system/executive_unittest.py:
+        (ExecutiveTest.test_kill_process):
+        (ExecutiveTest._assert_windows_image_name):
+        (ExecutiveTest):
+        (ExecutiveTest.test_windows_image_name):
+
 2012-07-19  Sudarsana Nagineni  <[email protected]>
 
         [EFL] [WK2] Add a callback to handle delete request in MiniBrowser

Modified: trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py (123172 => 123173)


--- trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py	2012-07-20 04:08:16 UTC (rev 123172)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive_unittest.py	2012-07-20 04:23:05 UTC (rev 123173)
@@ -164,32 +164,13 @@
             self.assertTrue(process.wait() in (0, 1))
         else:
             expected_exit_code = -signal.SIGKILL
-            try:
-                self.assertEqual(process.wait(), expected_exit_code)
-            except OSError, e:
-                # FIXME: This seems to fail sometimes this way when the test is being run in parallel with other tests.
-                assert(e.errno == errno.ECHILD)
+            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])
@@ -207,6 +188,20 @@
         # 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()))
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to