Changeset 76071 in webkit


Ignore:
Timestamp:
Jan 18, 2011 2:59:09 PM (13 years ago)
Author:
eric@webkit.org
Message:

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

Reviewed by Adam Barth.

commit-queue dies when test archiving fails
https://bugs.webkit.org/show_bug.cgi?id=52617

I looked at the machine and it had 10 archives already
thus find_unused_name was returning None. I've upped
the limit to 100 (per bug) and tested the case where
find_unused_name returns None (making archive return None).

  • Scripts/webkitpy/common/system/workspace.py:
  • Scripts/webkitpy/common/system/workspace_unittest.py:
  • Scripts/webkitpy/tool/bot/commitqueuetask.py:
  • Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
  • Scripts/webkitpy/tool/commands/queues.py:
Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r76059 r76071  
     12011-01-18  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        commit-queue dies when test archiving fails
     6        https://bugs.webkit.org/show_bug.cgi?id=52617
     7
     8        I looked at the machine and it had 10 archives already
     9        thus find_unused_name was returning None.  I've upped
     10        the limit to 100 (per bug) and tested the case where
     11        find_unused_name returns None (making archive return None).
     12
     13        * Scripts/webkitpy/common/system/workspace.py:
     14        * Scripts/webkitpy/common/system/workspace_unittest.py:
     15        * Scripts/webkitpy/tool/bot/commitqueuetask.py:
     16        * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
     17        * Scripts/webkitpy/tool/commands/queues.py:
     18
    1192011-01-18  Dirk Pranke  <dpranke@chromium.org>
    220
  • trunk/Tools/Scripts/webkitpy/common/system/workspace.py

    r75583 r76071  
    3737        self._executive = executive  # FIXME: Remove if create_zip is moved to python.
    3838
    39     def find_unused_filename(self, directory, name, extension, search_limit=10):
     39    def find_unused_filename(self, directory, name, extension, search_limit=100):
    4040        for count in range(search_limit):
    4141            if count:
  • trunk/Tools/Scripts/webkitpy/common/system/workspace_unittest.py

    r75583 r76071  
    4141            "dir/foo.jpg": "",
    4242            "dir/foo-1.jpg": "",
     43            "dir/foo-2.jpg": "",
    4344        })
    4445        workspace = Workspace(filesystem, None)
    4546        self.assertEqual(workspace.find_unused_filename("bar", "bar", "bar"), "bar/bar.bar")
    46         self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg"), "dir/foo-2.jpg")
     47        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg", search_limit=1), None)
     48        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg", search_limit=2), None)
     49        self.assertEqual(workspace.find_unused_filename("dir", "foo", "jpg"), "dir/foo-3.jpg")
    4750
    4851    def test_create_zip(self):
  • trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py

    r75480 r76071  
    188188        first_results_archive = self._delegate.archive_last_layout_test_results(self._patch)
    189189        if self._test():
    190             self._report_flaky_tests(first_results, first_results_archive)
     190            # Only report flaky tests if we were successful at archiving results.
     191            if first_results_archive:
     192                self._report_flaky_tests(first_results, first_results_archive)
    191193            return True
    192194
  • trunk/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py

    r75480 r76071  
    210210        self._run_through_task(commit_queue, expected_stderr)
    211211
     212    def test_failed_archive(self):
     213        commit_queue = MockCommitQueue([
     214            None,
     215            None,
     216            None,
     217            None,
     218            ScriptError("MOCK tests failure"),
     219        ])
     220        # It's possible delegate to fail to archive layout tests, don't try to report
     221        # flaky tests when that happens.
     222        commit_queue.archive_last_layout_test_results = lambda patch: None
     223        expected_stderr = """run_webkit_patch: ['clean']
     224command_passed: success_message='Cleaned working directory' patch='197'
     225run_webkit_patch: ['update']
     226command_passed: success_message='Updated working directory' patch='197'
     227run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 197]
     228command_passed: success_message='Applied patch' patch='197'
     229run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
     230command_passed: success_message='Built patch' patch='197'
     231run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']
     232command_failed: failure_message='Patch does not pass tests' script_error='MOCK tests failure' patch='197'
     233run_webkit_patch: ['build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive']
     234command_passed: success_message='Passed tests' patch='197'
     235run_webkit_patch: ['land-attachment', '--force-clean', '--ignore-builders', '--non-interactive', '--parent-command=commit-queue', 197]
     236command_passed: success_message='Landed patch' patch='197'
     237"""
     238        self._run_through_task(commit_queue, expected_stderr)
     239
    212240    _double_flaky_test_counter = 0
    213241
  • trunk/Tools/Scripts/webkitpy/tool/commands/queues.py

    r76050 r76071  
    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        if not zip_path:
     327            return None
    326328        archive = self._tool.workspace.create_zip(zip_path, results_directory)
    327329        # Remove the results directory to prevent http logs, etc. from getting huge between runs.
Note: See TracChangeset for help on using the changeset viewer.