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

Unified Diff: gm/rebaseline_server/results.py

Issue 27218005: rebaseline_server: add --editable and --reload flags (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: windowTitle Created 7 years, 2 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
« no previous file with comments | « no previous file | gm/rebaseline_server/server.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/results.py
===================================================================
--- gm/rebaseline_server/results.py (revision 11776)
+++ gm/rebaseline_server/results.py (working copy)
@@ -16,6 +16,7 @@
import os
import re
import sys
+import time
# Imports from within Skia
#
@@ -53,7 +54,14 @@
self._actual_builder_dicts = Results._get_dicts_from_root(actuals_root)
self._expected_builder_dicts = Results._get_dicts_from_root(expected_root)
self._combine_actual_and_expected()
+ self._timestamp = int(time.time())
+ def get_timestamp(self):
+ """Return the time at which this object was created, in seconds past epoch
+ (UTC).
+ """
+ return self._timestamp
+
def get_results_of_type(self, type):
"""Return results of some/all tests (depending on 'type' parameter).
@@ -113,7 +121,12 @@
Returns:
A meta-dictionary containing all the JSON dictionaries found within
the directory tree, keyed by the builder name of each dictionary.
+
+ Raises:
+ IOError if root does not refer to an existing directory
"""
+ if not os.path.isdir(root):
+ raise IOError('no directory found at path %s' % root)
meta_dict = {}
for dirpath, dirnames, filenames in os.walk(root):
for matching_filename in fnmatch.filter(filenames, pattern):
« no previous file with comments | « no previous file | gm/rebaseline_server/server.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698