[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:50:40 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit a221f904874a7805b45f2834be54026d9e1f8183
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jan 12 03:20:46 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
The zips are mostly empty due to forgetting -r.
Expected diffs were not being pulled from the archive due
to the archive having longer paths than I realized.
* Scripts/webkitpy/common/system/workspace.py:
* Scripts/webkitpy/common/system/workspace_unittest.py:
* Scripts/webkitpy/tool/bot/flakytestreporter.py:
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index bdd502c..ff09500 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,19 @@
+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
+
+ The zips are mostly empty due to forgetting -r.
+ Expected diffs were not being pulled from the archive due
+ to the archive having longer paths than I realized.
+
+ * Scripts/webkitpy/common/system/workspace.py:
+ * Scripts/webkitpy/common/system/workspace_unittest.py:
+ * Scripts/webkitpy/tool/bot/flakytestreporter.py:
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+
2011-01-11 Dirk Pranke <dpranke at chromium.org>
Reviewed by Ojan Vafai.
diff --git a/Tools/Scripts/webkitpy/common/system/workspace.py b/Tools/Scripts/webkitpy/common/system/workspace.py
index 399f3e4..3b755ad 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace.py
@@ -57,5 +57,5 @@ class Workspace(object):
# zip_file.write(os.path.relpath(path, source_path))
# 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])
+ self._executive.run_command(['zip', '-r', 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 ff52250..e5fbb26 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
@@ -47,7 +47,7 @@ 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"
+ expected_stderr = "MOCK run_command: ['zip', '-r', '/zip/path', '/source/path']\n"
class MockZipFile(object):
def __init__(self, path):
self.filename = path
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
index 69a74d1..270a656 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
@@ -150,14 +150,23 @@ If you would like to track this test fix with another bug, please close this bug
else:
self._tool.bugs.post_comment_to_bug(bug.id(), latest_flake_message)
+ # This method is needed because our archive paths include a leading tmp/layout-test-results
+ def _find_in_archive(self, path, archive):
+ for archived_path in archive.namelist():
+ # Archives are currently created with full paths.
+ if archived_path.endswith(path):
+ return archived_path
+ return None
+
def _attach_failure_diff(self, flake_bug_id, flaky_test, results_archive):
results_diff_path = self._results_diff_path_for_test(flaky_test)
# Check to make sure that the path makes sense.
# Since we're not actually getting this path from the results.html
# there is a chance it's wrong.
bot_id = self._tool.status_server.bot_id or "bot"
- if results_diff_path in results_archive.namelist():
- results_diff = results_archive.read(results_diff_path)
+ archive_path = self._find_in_archive(results_diff_path, results_archive)
+ if archive_path:
+ results_diff = results_archive.read(archive_path)
description = "Failure diff from %s" % bot_id
self._tool.bugs.add_attachment_to_bug(flake_bug_id, results_diff, description, filename="failure.diff")
else:
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
index 6635e60..26c98c1 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
@@ -161,4 +161,13 @@ The dummy-queue is continuing to process your patch.
reporter = FlakyTestReporter(MockTool(), 'dummy-queue')
self.assertEqual(reporter._results_diff_path_for_test("test.html"), "test-diffs.txt")
- # report_flaky_tests is also tested by queues_unittest
+ def test_find_in_archive(self):
+ reporter = FlakyTestReporter(MockTool(), 'dummy-queue')
+
+ class MockZipFile(object):
+ def namelist(self):
+ return ["tmp/layout-test-results/foo/bar-diffs.txt"]
+
+ reporter._find_in_archive("foo/bar-diffs.txt", MockZipFile())
+ # This is not ideal, but its
+ reporter._find_in_archive("txt", MockZipFile())
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list