| Index: trunk/src/chrome/test/functional/ispy/common/ispy_utils.py
|
| ===================================================================
|
| --- trunk/src/chrome/test/functional/ispy/common/ispy_utils.py (revision 241749)
|
| +++ trunk/src/chrome/test/functional/ispy/common/ispy_utils.py (working copy)
|
| @@ -2,11 +2,8 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| -"""Internal utilities for managing I-Spy test results in Google Cloud Storage.
|
| +"""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
|
| import json
|
| @@ -47,22 +44,9 @@
|
| Returns:
|
| the path as a string relative to the bucket.
|
| """
|
| - return GetTestRunPath(test_run, '%s/%s' % (expectation, file_name))
|
| + return 'failures/%s/%s/%s' % (test_run, 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):
|
| """Utility functions for working with an I-Spy google storage bucket."""
|
|
|
| @@ -108,6 +92,7 @@
|
| """
|
| 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.
|
|
|
|
|