| Index: tools/rebaseline_imagefiles.py
|
| ===================================================================
|
| --- tools/rebaseline_imagefiles.py (revision 10108)
|
| +++ tools/rebaseline_imagefiles.py (working copy)
|
| @@ -75,9 +75,7 @@
|
| self._dry_run = dry_run
|
| self._add_new = add_new
|
| self._missing_json_is_fatal = missing_json_is_fatal
|
| - self._googlestorage_gm_actuals_root = (
|
| - 'http://chromium-skia-gm.commondatastorage.googleapis.com/gm')
|
| - self._testname_pattern = re.compile('(\S+)_(\S+).png')
|
| + self._image_filename_re = re.compile(gm_json.IMAGE_FILENAME_PATTERN)
|
| self._is_svn_checkout = (
|
| os.path.exists(os.path.join(expectations_root, '.svn')) or
|
| os.path.exists(os.path.join(expectations_root, os.pardir, '.svn')))
|
| @@ -99,7 +97,7 @@
|
| # Download a single actual result from GoogleStorage.
|
| # Raises an exception if it fails.
|
| def _DownloadFromGoogleStorage(self, infilename, outfilename, all_results):
|
| - test_name = self._testname_pattern.match(infilename).group(1)
|
| + test_name = self._image_filename_re.match(infilename).group(1)
|
| if not test_name:
|
| raise Exception('unable to find test_name for infilename %s' %
|
| infilename)
|
| @@ -112,8 +110,8 @@
|
| raise Exception(
|
| 'ValueError reading filename %s from all_results dict: %s' % (
|
| infilename, e))
|
| - url = '%s/%s/%s/%s.png' % (self._googlestorage_gm_actuals_root,
|
| - hash_type, test_name, hash_value)
|
| + url = gm_json.CreateGmActualUrl(
|
| + test_name=test_name, hash_type=hash_type, hash_digest=hash_value)
|
| try:
|
| self._DownloadFile(source_url=url, dest_filename=outfilename)
|
| except CommandFailedException:
|
| @@ -267,7 +265,7 @@
|
| add_new=self._add_new)
|
| skipped_files = []
|
| for filename in filenames:
|
| - (test, config) = self._testname_pattern.match(filename).groups()
|
| + (test, config) = self._image_filename_re.match(filename).groups()
|
| if self._tests:
|
| if test not in self._tests:
|
| skipped_files.append(filename)
|
|
|