[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
eric at webkit.org
eric at webkit.org
Sun Feb 20 22:47:51 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 3f96519c2918cc842df0f1c5e72cd6f23a384a04
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 11 19:28:35 2011 +0000
2011-01-11 Eric Seidel <eric at 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:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index a292cb8..e9ccd7a 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2011-01-11 Eric Seidel <eric at 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:
+
2011-01-11 Sam Weinig <sam at webkit.org>
Roll r75474 back in.
diff --git a/Tools/Scripts/webkitpy/common/system/workspace.py b/Tools/Scripts/webkitpy/common/system/workspace.py
index 4126053..399f3e4 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace.py
@@ -29,6 +29,7 @@
# A home for file logic which should sit above FileSystem, but
# below more complicated objects.
+import zipfile
class Workspace(object):
def __init__(self, filesystem, executive):
@@ -47,7 +48,7 @@ class Workspace(object):
# If we can't find an unused name in search_limit tries, just give up.
return None
- def create_zip(self, zip_path, source_path):
+ def create_zip(self, zip_path, source_path, zip_class=zipfile.ZipFile):
# It's possible to create zips with Python:
# zip_file = ZipFile(zip_path, 'w')
# for root, dirs, files in os.walk(source_path):
@@ -57,3 +58,4 @@ class Workspace(object):
# However, getting the paths, encoding and compression correct could be non-trivial.
# So, for now we depend on the environment having "zip" installed (likely fails on Win32)
self._executive.run_command(['zip', zip_path, source_path])
+ return zip_class(zip_path)
diff --git a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
index 6348e83..ff52250 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
@@ -48,4 +48,8 @@ class WorkspaceTest(unittest.TestCase):
def test_create_zip(self):
workspace = Workspace(None, MockExecutive(should_log=True))
expected_stderr = "MOCK run_command: ['zip', '/zip/path', '/source/path']\n"
- OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path"], expected_stderr=expected_stderr)
+ class MockZipFile(object):
+ def __init__(self, path):
+ self.filename = path
+ archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_stderr=expected_stderr)
+ self.assertEqual(archive.filename, "/zip/path")
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py
index 62a8096..90b2b4d 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py
@@ -323,8 +323,7 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
results_name, _ = os.path.splitext(os.path.basename(results_directory))
# Note: We name the zip with the bug_id instead of patch_id to match work_item_log_path().
zip_path = self._tool.workspace.find_unused_filename(self._log_directory(), "%s-%s" % (patch.bug_id(), results_name), "zip")
- self._tool.workspace.create_zip(zip_path, results_directory)
- return zip_path
+ return self._tool.workspace.create_zip(zip_path, results_directory)
def refetch_patch(self, patch):
return self._tool.bugs.fetch_attachment(patch.id())
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list