Title: [120183] trunk/Tools
Revision
120183
Author
[email protected]
Date
2012-06-13 04:31:20 -0700 (Wed, 13 Jun 2012)

Log Message

Prevent stderr output from messing up detection of build path

https://bugs.webkit.org/show_bug.cgi?id=88075

Warnings such as 'perl: warning: Setting locale failed' will otherwise
end up as the build path when calling out to webkit-build-directory.

Reviewed by Ojan Vafai.

* Scripts/webkitpy/layout_tests/port/config.py:
(Config.build_directory):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (120182 => 120183)


--- trunk/Tools/ChangeLog	2012-06-13 11:27:37 UTC (rev 120182)
+++ trunk/Tools/ChangeLog	2012-06-13 11:31:20 UTC (rev 120183)
@@ -1,3 +1,17 @@
+2012-06-13  Tor Arne Vestbø  <[email protected]>
+
+        Prevent stderr output from messing up detection of build path
+
+        https://bugs.webkit.org/show_bug.cgi?id=88075
+
+        Warnings such as 'perl: warning: Setting locale failed' will otherwise
+        end up as the build path when calling out to webkit-build-directory.
+
+        Reviewed by Ojan Vafai.
+
+        * Scripts/webkitpy/layout_tests/port/config.py:
+        (Config.build_directory):
+
 2012-06-13  Ryosuke Niwa  <[email protected]>
 
         Update the builder name for Apple Lion builders.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py (120182 => 120183)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py	2012-06-13 11:27:37 UTC (rev 120182)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/config.py	2012-06-13 11:31:20 UTC (rev 120183)
@@ -78,7 +78,7 @@
 
         if not self._build_directories.get(configuration):
             args = ["perl", self.script_path("webkit-build-directory")] + flags
-            output = self._executive.run_command(args, cwd=self.webkit_base_dir()).rstrip()
+            output = self._executive.run_command(args, cwd=self.webkit_base_dir(), return_stderr=False).rstrip()
             parts = output.split("\n")
             self._build_directories[configuration] = parts[0]
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py (120182 => 120183)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py	2012-06-13 11:27:37 UTC (rev 120182)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py	2012-06-13 11:31:20 UTC (rev 120183)
@@ -46,8 +46,8 @@
     def tearDown(self):
         config.clear_cached_configuration()
 
-    def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None):
-        e = MockExecutive2(output=output, exit_code=exit_code, exception=exception, run_command_fn=run_command_fn)
+    def make_config(self, output='', files=None, exit_code=0, exception=None, run_command_fn=None, stderr=''):
+        e = MockExecutive2(output=output, exit_code=exit_code, exception=exception, run_command_fn=run_command_fn, stderr=stderr)
         fs = MockFileSystem(files)
         return config.Config(e, fs)
 
@@ -87,6 +87,10 @@
         self.assertTrue(c.build_directory('Debug').endswith('/Debug'))
         self.assertRaises(KeyError, c.build_directory, 'Unknown')
 
+        # Test that stderr output from webkit-build-directory won't mangle the build dir
+        c = self.make_config(output='/WebKitBuild/', stderr="mock stderr output from webkit-build-directory")
+        self.assertEqual(c.build_directory(None), '/WebKitBuild/')
+
     def test_default_configuration__release(self):
         self.assert_configuration('Release', 'Release')
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to