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

Unified Diff: gm/rebaseline_server/results.py

Issue 134643010: rebaseline_server: ignore TSAN, ASAN, Valgrind bots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 11 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/tests/inputs/gm-actuals/Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Valgrind/actual-results.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/results.py
diff --git a/gm/rebaseline_server/results.py b/gm/rebaseline_server/results.py
index 8fda3dfb42a1eb5e6862703f44cae6084e0a5448..fff0a941e89aac91d82f390e7e8444eebdcc21b7 100755
--- a/gm/rebaseline_server/results.py
+++ b/gm/rebaseline_server/results.py
@@ -180,6 +180,26 @@ class Results(object):
return self._results[type]
@staticmethod
+ def _ignore_builder(builder):
+ """Returns True if we should ignore expectations and actuals for a builder.
+
+ This allows us to ignore builders for which we don't maintain expectations
+ (trybots, Valgrind, ASAN, TSAN), and avoid problems like
+ https://code.google.com/p/skia/issues/detail?id=2036 ('rebaseline_server
+ produces error when trying to add baselines for ASAN/TSAN builders')
+
+ Args:
+ builder: name of this builder, as a string
+
+ Returns:
+ True if we should ignore expectations and actuals for this builder.
+ """
+ return (builder.endswith('-Trybot') or
+ ('Valgrind' in builder) or
+ ('TSAN' in builder) or
+ ('ASAN' in builder))
+
+ @staticmethod
def _read_dicts_from_root(root, pattern='*.json'):
"""Read all JSON dictionaries within a directory tree.
@@ -200,9 +220,7 @@ class Results(object):
for dirpath, dirnames, filenames in os.walk(root):
for matching_filename in fnmatch.filter(filenames, pattern):
builder = os.path.basename(dirpath)
- # If we are reading from the collection of actual results, skip over
- # the Trybot results (we don't maintain baselines for them).
- if builder.endswith('-Trybot'):
+ if Results._ignore_builder(builder):
continue
fullpath = os.path.join(dirpath, matching_filename)
meta_dict[builder] = gm_json.LoadFromFile(fullpath)
@@ -236,11 +254,7 @@ class Results(object):
for dirpath, dirnames, filenames in os.walk(root):
for matching_filename in fnmatch.filter(filenames, pattern):
builder = os.path.basename(dirpath)
- # We should never encounter Trybot *expectations*, but if we are
- # writing into the actual-results dir, skip the Trybot actuals.
- # (I don't know why we would ever write into the actual-results dir,
- # though.)
- if builder.endswith('-Trybot'):
+ if Results._ignore_builder(builder):
continue
per_builder_dict = meta_dict.get(builder)
if per_builder_dict is not None:
« no previous file with comments | « no previous file | gm/rebaseline_server/tests/inputs/gm-actuals/Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Release-Valgrind/actual-results.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698