Changeset 75520 in webkit


Ignore:
Timestamp:
Jan 11, 2011 11:28:35 AM (13 years ago)
Author:
eric@webkit.org
Message:

2011-01-11 Eric Seidel <eric@webkit.org>

Unreviewed.

commit-queue should know how to upload archived results (for test flakes or general failures)
https://bugs.webkit.org/show_bug.cgi?id=52048

I changed the API for archive_last_layout_test_results w/o updating the implementation. Oops.
This fixes an exception seen on the commit-queue when attempting to report flaky tests.

  • Scripts/webkitpy/common/system/workspace.py:
  • Scripts/webkitpy/common/system/workspace_unittest.py:
  • Scripts/webkitpy/tool/commands/queues.py:
Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r75508 r75520  
     12011-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
    1152011-01-11  Sam Weinig  <sam@webkit.org>
    216
  • trunk/Tools/Scripts/webkitpy/common/system/workspace.py

    r75480 r75520  
    3030# below more complicated objects.
    3131
     32import zipfile
    3233
    3334class Workspace(object):
     
    4849        return None
    4950
    50     def create_zip(self, zip_path, source_path):
     51    def create_zip(self, zip_path, source_path, zip_class=zipfile.ZipFile):
    5152        # It's possible to create zips with Python:
    5253        # zip_file = ZipFile(zip_path, 'w')
     
    5859        # So, for now we depend on the environment having "zip" installed (likely fails on Win32)
    5960        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  
    4949        workspace = Workspace(None, MockExecutive(should_log=True))
    5050        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  
    324324        # Note: We name the zip with the bug_id instead of patch_id to match work_item_log_path().
    325325        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)
    328327
    329328    def refetch_patch(self, patch):
Note: See TracChangeset for help on using the changeset viewer.