Changeset 84333 in webkit
- Timestamp:
- Apr 19, 2011 8:17:20 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r84317 r84333 1 2011-04-19 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Adam Barth. 4 5 The commit-queue is confused when non-layout tests fail 6 https://bugs.webkit.org/show_bug.cgi?id=58955 7 8 As seen in http://queues.webkit.org/results/8474435 9 10 It fails to create an archive of the layout test results 11 and then throws an exception. 12 13 I've fixed this by making it catch the exception as well 14 as made it so it never calls that path in the common case. 15 16 I've updated MockFileSystem to understand rmtree's affect on 17 directories as well as files. 18 19 * Scripts/webkitpy/common/system/filesystem_mock.py: 20 * Scripts/webkitpy/common/system/workspace.py: 21 * Scripts/webkitpy/tool/commands/queues.py: 22 * Scripts/webkitpy/tool/commands/queues_unittest.py: 23 * Scripts/webkitpy/tool/mocktool.py: 24 1 25 2011-04-19 Ojan Vafai <ojan@chromium.org> 2 26 -
trunk/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
r84075 r84333 148 148 path = self.normpath(path) 149 149 if path in self.dirs: 150 return True150 return self.dirs[path] is not None 151 151 152 152 # We need to use a copy of the keys here in order to avoid switching … … 268 268 269 269 def rmtree(self, path): 270 if not path.endswith(self.sep): 271 path += self.sep 270 path = self.normpath(path) 272 271 273 272 for f in self.files: 274 273 if f.startswith(path): 275 274 self.files[f] = None 275 276 for d in self.dirs: 277 if d.startswith(path): 278 self.dirs[d] = None 276 279 277 280 def splitext(self, path): -
trunk/Tools/Scripts/webkitpy/common/system/workspace.py
r76071 r84333 30 30 # below more complicated objects. 31 31 32 import logging 32 33 import zipfile 34 35 36 _log = logging.getLogger(__name__) 37 33 38 34 39 class Workspace(object): … … 58 63 # However, getting the paths, encoding and compression correct could be non-trivial. 59 64 # So, for now we depend on the environment having "zip" installed (likely fails on Win32) 60 self._executive.run_command(['zip', '-r', zip_path, source_path]) 65 try: 66 self._executive.run_command(['zip', '-r', zip_path, source_path]) 67 except ScriptError, e: 68 _log.error("Workspace.create_zip failed:\n%s" % e.message_with_output()) 69 return None 70 61 71 return zip_class(zip_path) -
trunk/Tools/Scripts/webkitpy/tool/commands/queues.py
r83906 r84333 354 354 if not zip_path: 355 355 return None 356 if not self._tool.filesystem.isdir(results_directory): 357 log("%s does not exist, not archiving." % results_directory) 358 return None 356 359 archive = self._tool.workspace.create_zip(zip_path, results_directory) 357 360 # Remove the results directory to prevent http logs, etc. from getting huge between runs. -
trunk/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
r83906 r84333 404 404 def test_archive_last_layout_test_results(self): 405 405 queue = CommitQueue() 406 queue.bind_to_tool(MockTool()) 406 tool = MockTool() 407 queue.bind_to_tool(tool) 407 408 patch = queue._tool.bugs.fetch_attachment(128) 408 # This is just to test that the method doesn't raise. 409 queue.archive_last_layout_test_results(patch) 409 # Should fail because the results_directory does not exist. 410 expected_stderr = "/mock does not exist, not archiving.\n" 411 archive = OutputCapture().assert_outputs(self, queue.archive_last_layout_test_results, [patch], expected_stderr=expected_stderr) 412 self.assertEqual(archive, None) 413 414 results_directory = "/mock" 415 # Sanity check what we assume our mock results directory is. 416 self.assertEqual(queue._results_directory(), results_directory) 417 tool.filesystem.maybe_make_directory(results_directory) 418 self.assertTrue(tool.filesystem.exists(results_directory)) 419 420 self.assertNotEqual(queue.archive_last_layout_test_results(patch), None) 421 self.assertFalse(tool.filesystem.exists(results_directory)) 410 422 411 423 def test_upload_results_archive_for_patch(self): -
trunk/Tools/Scripts/webkitpy/tool/mocktool.py
r83158 r84333 729 729 730 730 def create_zip(self, zip_path, source_path): 731 pass731 return object() # Something that is not None 732 732 733 733
Note: See TracChangeset
for help on using the changeset viewer.