aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/rebaseline_server/compare_configs.py
diff options
context:
space:
mode:
authorGravatar epoger <epoger@google.com>2014-06-05 10:30:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-05 10:30:37 -0700
commitb144271179aaf82cb1151e9dfd8e866747402594 (patch)
treeee5d50580585a1295e390a6567c94d5e5dfe7b42 /gm/rebaseline_server/compare_configs.py
parent9de2fb680f0f09d759fcbedf22f69158fcb84682 (diff)
reland "rebaseline_server: download actual-results.json files from GCS instead of SVN"
relands https://codereview.chromium.org/310093003 with modifications. BUG=skia:2641 R=jcgregorio@google.com Author: epoger@google.com Review URL: https://codereview.chromium.org/313343003
Diffstat (limited to 'gm/rebaseline_server/compare_configs.py')
-rwxr-xr-xgm/rebaseline_server/compare_configs.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/gm/rebaseline_server/compare_configs.py b/gm/rebaseline_server/compare_configs.py
index aa26ba6f37..4075da4263 100755
--- a/gm/rebaseline_server/compare_configs.py
+++ b/gm/rebaseline_server/compare_configs.py
@@ -14,28 +14,12 @@ import argparse
import fnmatch
import json
import logging
-import os
import re
-import sys
import time
# Imports from within Skia
-#
-# TODO(epoger): Once we move the create_filepath_url() function out of
-# download_actuals into a shared utility module, we won't need to import
-# download_actuals anymore.
-#
-# We need to add the 'gm' directory, so that we can import gm_json.py within
-# that directory. That script allows us to parse the actual-results.json file
-# written out by the GM tool.
-# Make sure that the 'gm' dir is in the PYTHONPATH, but add it at the *end*
-# so any dirs that are already in the PYTHONPATH will be preferred.
-PARENT_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
-GM_DIRECTORY = os.path.dirname(PARENT_DIRECTORY)
-TRUNK_DIRECTORY = os.path.dirname(GM_DIRECTORY)
-if GM_DIRECTORY not in sys.path:
- sys.path.append(GM_DIRECTORY)
-import download_actuals
+import fix_pythonpath # must do this first
+from pyutils import url_utils
import gm_json
import imagediffdb
import imagepair
@@ -71,7 +55,7 @@ class ConfigComparisons(results.BaseComparisons):
self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
self._diff_base_url = (
diff_base_url or
- download_actuals.create_filepath_url(generated_images_root))
+ url_utils.create_filepath_url(generated_images_root))
self._actuals_root = actuals_root
self._load_config_pairs(configs)
self._timestamp = int(time.time())