Changeset 75583 in webkit
- Timestamp:
- Jan 11, 2011 7:20:46 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r75576 r75583 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 The zips are mostly empty due to forgetting -r. 9 Expected diffs were not being pulled from the archive due 10 to the archive having longer paths than I realized. 11 12 * Scripts/webkitpy/common/system/workspace.py: 13 * Scripts/webkitpy/common/system/workspace_unittest.py: 14 * Scripts/webkitpy/tool/bot/flakytestreporter.py: 15 * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py: 16 1 17 2011-01-11 Dirk Pranke <dpranke@chromium.org> 2 18 -
trunk/Tools/Scripts/webkitpy/common/system/workspace.py
r75520 r75583 58 58 # However, getting the paths, encoding and compression correct could be non-trivial. 59 59 # So, for now we depend on the environment having "zip" installed (likely fails on Win32) 60 self._executive.run_command(['zip', zip_path, source_path])60 self._executive.run_command(['zip', '-r', zip_path, source_path]) 61 61 return zip_class(zip_path) -
trunk/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
r75520 r75583 48 48 def test_create_zip(self): 49 49 workspace = Workspace(None, MockExecutive(should_log=True)) 50 expected_stderr = "MOCK run_command: ['zip', ' /zip/path', '/source/path']\n"50 expected_stderr = "MOCK run_command: ['zip', '-r', '/zip/path', '/source/path']\n" 51 51 class MockZipFile(object): 52 52 def __init__(self, path): -
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
r75480 r75583 151 151 self._tool.bugs.post_comment_to_bug(bug.id(), latest_flake_message) 152 152 153 # This method is needed because our archive paths include a leading tmp/layout-test-results 154 def _find_in_archive(self, path, archive): 155 for archived_path in archive.namelist(): 156 # Archives are currently created with full paths. 157 if archived_path.endswith(path): 158 return archived_path 159 return None 160 153 161 def _attach_failure_diff(self, flake_bug_id, flaky_test, results_archive): 154 162 results_diff_path = self._results_diff_path_for_test(flaky_test) … … 157 165 # there is a chance it's wrong. 158 166 bot_id = self._tool.status_server.bot_id or "bot" 159 if results_diff_path in results_archive.namelist(): 160 results_diff = results_archive.read(results_diff_path) 167 archive_path = self._find_in_archive(results_diff_path, results_archive) 168 if archive_path: 169 results_diff = results_archive.read(archive_path) 161 170 description = "Failure diff from %s" % bot_id 162 171 self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, description, filename="failure.diff") -
trunk/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
r75480 r75583 162 162 self.assertEqual(reporter._results_diff_path_for_test("test.html"), "test-diffs.txt") 163 163 164 # report_flaky_tests is also tested by queues_unittest 164 def test_find_in_archive(self): 165 reporter = FlakyTestReporter(MockTool(), 'dummy-queue') 166 167 class MockZipFile(object): 168 def namelist(self): 169 return ["tmp/layout-test-results/foo/bar-diffs.txt"] 170 171 reporter._find_in_archive("foo/bar-diffs.txt", MockZipFile()) 172 # This is not ideal, but its 173 reporter._find_in_archive("txt", MockZipFile())
Note: See TracChangeset
for help on using the changeset viewer.