Title: [139084] trunk/Tools
Revision
139084
Author
[email protected]
Date
2013-01-08 11:19:37 -0800 (Tue, 08 Jan 2013)

Log Message

test-webkitpy shows failure output on my linux box
https://bugs.webkit.org/show_bug.cgi?id=101261

Reviewed by Eric Seidel.

Mock out the PulseAudioSanitizer methods when creating testing instances
of EflPort and GtkPort interfaces in unit tests. This stops throwing up
PulseAudio output when the sanitizer was trying to unload modules which
were already unloaded by another unit test that was being run in parallel.

* Scripts/webkitpy/layout_tests/port/efl_unittest.py:
(EflPortTest):
(EflPortTest.make_port):
* Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
(GtkPortTest):
(GtkPortTest.make_port):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (139083 => 139084)


--- trunk/Tools/ChangeLog	2013-01-08 19:15:56 UTC (rev 139083)
+++ trunk/Tools/ChangeLog	2013-01-08 19:19:37 UTC (rev 139084)
@@ -1,3 +1,22 @@
+2013-01-08  Zan Dobersek  <[email protected]>
+
+        test-webkitpy shows failure output on my linux box
+        https://bugs.webkit.org/show_bug.cgi?id=101261
+
+        Reviewed by Eric Seidel.
+
+        Mock out the PulseAudioSanitizer methods when creating testing instances
+        of EflPort and GtkPort interfaces in unit tests. This stops throwing up
+        PulseAudio output when the sanitizer was trying to unload modules which
+        were already unloaded by another unit test that was being run in parallel.
+
+        * Scripts/webkitpy/layout_tests/port/efl_unittest.py:
+        (EflPortTest):
+        (EflPortTest.make_port):
+        * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+        (GtkPortTest):
+        (GtkPortTest.make_port):
+
 2013-01-08  Julie Parent  <[email protected]>
 
         Dashboard Cleanup: Remove g_hasDoneInitialPageGeneration

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py (139083 => 139084)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py	2013-01-08 19:15:56 UTC (rev 139083)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py	2013-01-08 19:19:37 UTC (rev 139084)
@@ -36,6 +36,13 @@
     port_name = 'efl'
     port_maker = EflPort
 
+    # Additionally mocks out the PulseAudioSanitizer methods.
+    def make_port(self, host=None, port_name=None, options=None, os_name=None, os_version=None, **kwargs):
+        port = super(EflPortTest, self).make_port(host, port_name, options, os_name, os_version, **kwargs)
+        port._unload_pulseaudio_module = lambda: None
+        port._restore_pulseaudio_module = lambda: None
+        return port
+
     def test_show_results_html_file(self):
         port = self.make_port()
         port._executive = MockExecutive(should_log=True)

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py (139083 => 139084)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py	2013-01-08 19:15:56 UTC (rev 139083)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py	2013-01-08 19:19:37 UTC (rev 139084)
@@ -43,6 +43,13 @@
     port_name = 'gtk'
     port_maker = GtkPort
 
+    # Additionally mocks out the PulseAudioSanitizer methods.
+    def make_port(self, host=None, port_name=None, options=None, os_name=None, os_version=None, **kwargs):
+        port = super(GtkPortTest, self).make_port(host, port_name, options, os_name, os_version, **kwargs)
+        port._unload_pulseaudio_module = lambda: None
+        port._restore_pulseaudio_module = lambda: None
+        return port
+
     def test_expectations_files(self):
         port = self.make_port()
         self.assertEquals(port.expectations_files(), ['/mock-checkout/LayoutTests/platform/gtk/TestExpectations', '/mock-checkout/LayoutTests/platform/gtk-wk1/TestExpectations'])
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to