Changeset 75520 in webkit
- Timestamp:
- Jan 11, 2011 11:28:35 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r75508 r75520 1 2011-01-11 Eric Seidel <eric@webkit.org> 2 3 Unreviewed. 4 5 commit-queue should know how to upload archived results (for test flakes or general failures) 6 https://bugs.webkit.org/show_bug.cgi?id=52048 7 8 I changed the API for archive_last_layout_test_results w/o updating the implementation. Oops. 9 This fixes an exception seen on the commit-queue when attempting to report flaky tests. 10 11 * Scripts/webkitpy/common/system/workspace.py: 12 * Scripts/webkitpy/common/system/workspace_unittest.py: 13 * Scripts/webkitpy/tool/commands/queues.py: 14 1 15 2011-01-11 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Tools/Scripts/webkitpy/common/system/workspace.py
r75480 r75520 30 30 # below more complicated objects. 31 31 32 import zipfile 32 33 33 34 class Workspace(object): … … 48 49 return None 49 50 50 def create_zip(self, zip_path, source_path ):51 def create_zip(self, zip_path, source_path, zip_class=zipfile.ZipFile): 51 52 # It's possible to create zips with Python: 52 53 # zip_file = ZipFile(zip_path, 'w') … … 58 59 # So, for now we depend on the environment having "zip" installed (likely fails on Win32) 59 60 self._executive.run_command(['zip', zip_path, source_path]) 61 return zip_class(zip_path) -
trunk/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
r75480 r75520 49 49 workspace = Workspace(None, MockExecutive(should_log=True)) 50 50 expected_stderr = "MOCK run_command: ['zip', '/zip/path', '/source/path']\n" 51 OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path"], expected_stderr=expected_stderr) 51 class MockZipFile(object): 52 def __init__(self, path): 53 self.filename = path 54 archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_stderr=expected_stderr) 55 self.assertEqual(archive.filename, "/zip/path") -
trunk/Tools/Scripts/webkitpy/tool/commands/queues.py
r75480 r75520 324 324 # Note: We name the zip with the bug_id instead of patch_id to match work_item_log_path(). 325 325 zip_path = self._tool.workspace.find_unused_filename(self._log_directory(), "%s-%s" % (patch.bug_id(), results_name), "zip") 326 self._tool.workspace.create_zip(zip_path, results_directory) 327 return zip_path 326 return self._tool.workspace.create_zip(zip_path, results_directory) 328 327 329 328 def refetch_patch(self, patch):
Note: See TracChangeset
for help on using the changeset viewer.