Changeset 83759 in webkit
- Timestamp:
- Apr 13, 2011 1:58:13 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r83752 r83759 1 2011-04-13 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Ojan Vafai. 4 5 new-run-webkit-tests: suppress extraneous pretty patch warnings 6 https://bugs.webkit.org/show_bug.cgi?id=58295 7 8 NRWT wasn't being careful about when it logged messages from 9 PrettyPatch not being available; it should only log during 10 check_build(), and be silent otherwise. This was causing us to 11 get multiple errors at runtime, which was confusing. 12 13 * Scripts/webkitpy/layout_tests/port/base.py: 14 * Scripts/webkitpy/layout_tests/port/base_unittest.py: 15 * Scripts/webkitpy/layout_tests/port/chromium.py: 16 1 17 2011-04-13 Dirk Pranke <dpranke@chromium.org> 2 18 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
-
Property
svn:executable
set to
*
r83646 r83759 133 133 self._pretty_patch_path = self.path_from_webkit_base("Websites", 134 134 "bugs.webkit.org", "PrettyPatch", "prettify.rb") 135 # If we're running on a mocked-out filesystem, this file almost 136 # certainly won't be available, so it's a good test to keep us 137 # from erroring out later. 138 self._pretty_patch_available = self._filesystem.exists(self._pretty_patch_path) 135 self._pretty_patch_available = None 136 139 137 if not hasattr(self._options, 'configuration') or self._options.configuration is None: 140 138 self._options.configuration = self.default_configuration() … … 180 178 raise NotImplementedError('Port.check_image_diff') 181 179 182 def check_pretty_patch(self ):180 def check_pretty_patch(self, logging=True): 183 181 """Checks whether we can use the PrettyPatch ruby script.""" 184 185 182 # check if Ruby is installed 186 183 try: … … 188 185 except OSError, e: 189 186 if e.errno in [errno.ENOENT, errno.EACCES, errno.ECHILD]: 190 _log.error("Ruby is not installed; " 191 "can't generate pretty patches.") 187 if logging: 188 _log.error("Ruby is not installed; can't generate pretty patches.") 189 _log.error('') 190 return False 191 192 if not self.path_exists(self._pretty_patch_path): 193 if logging: 194 _log.error("Unable to find %s; can't generate pretty patches." % self._pretty_patch_path) 192 195 _log.error('') 193 return False194 195 if not self.path_exists(self._pretty_patch_path):196 _log.error('Unable to find %s .' % self._pretty_patch_path)197 _log.error("Can't generate pretty patches.")198 _log.error('')199 196 return False 200 197 … … 759 756 760 757 def pretty_patch_text(self, diff_path): 758 if self._pretty_patch_available is None: 759 self._pretty_patch_available = self.check_pretty_patch(logging=False) 761 760 if not self._pretty_patch_available: 762 761 return self._pretty_patch_error_html -
Property
svn:executable
set to
-
trunk/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
r83646 r83759 87 87 def test_pretty_patch_script_error(self): 88 88 # FIXME: This is some ugly white-box test hacking ... 89 base._pretty_patch_available = True90 89 port = base.Port(executive=executive_mock.MockExecutive2(exception=ScriptError)) 90 port._pretty_patch_available = True 91 91 self.assertEqual(port.pretty_patch_text("patch.txt"), 92 92 port._pretty_patch_error_html) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r83749 r83759 109 109 # It's okay if pretty patch isn't available, but we will at 110 110 # least log a message. 111 self. check_pretty_patch()111 self._pretty_patch_available = self.check_pretty_patch() 112 112 113 113 return result
Note: See TracChangeset
for help on using the changeset viewer.