Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9235)

Unified Diff: chrome/test/functional/ispy/common/ispy_utils.py

Issue 106523003: [I-Spy] Add support for rebaselining expectations from the web UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing dom.py Created 6 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/functional/ispy/common/ispy_utils.py
diff --git a/chrome/test/functional/ispy/common/ispy_utils.py b/chrome/test/functional/ispy/common/ispy_utils.py
index a5d140af58f1972e736bd638e09c9ec532b82fed..f869c61a70f307630faa84da09fd3a8d094987b1 100644
--- a/chrome/test/functional/ispy/common/ispy_utils.py
+++ b/chrome/test/functional/ispy/common/ispy_utils.py
@@ -2,7 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Utilities for managing I-Spy test results in Google Cloud Storage."""
+"""Internal utilities for managing I-Spy test results in Google Cloud Storage.
+
+See the ispy.client.chrome_utils module for the external API.
+"""
import collections
import itertools
@@ -44,7 +47,20 @@ def GetFailurePath(test_run, expectation, file_name=''):
Returns:
the path as a string relative to the bucket.
"""
- return 'failures/%s/%s/%s' % (test_run, expectation, file_name)
+ return GetTestRunPath(test_run, '%s/%s' % (expectation, file_name))
+
+
+def GetTestRunPath(test_run, file_name=''):
+ """Get the path to a the given test run.
+
+ Args:
+ test_run: name of the test run.
+ file_name: name of the file.
+
+ Returns:
+ the path as a string relative to the bucket.
+ """
+ return 'failures/%s/%s' % (test_run, file_name)
class ISpyUtils(object):
@@ -92,7 +108,6 @@ class ISpyUtils(object):
"""
self.cloud_bucket.UpdateFile(full_path, image_tools.EncodePNG(image))
-
def GenerateExpectation(self, expectation, images):
"""Creates and uploads an expectation to GS from a set of images and name.
« no previous file with comments | « chrome/test/functional/ispy/common/chrome_utils_unittest.py ('k') | chrome/test/functional/ispy/server/app.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698