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

Unified Diff: telemetry/telemetry/story/expectations.py

Issue 2903023002: [Telemetry] Do not have benchmarks validate story name in expectations during runs. (Closed)
Patch Set: [Telemetry] Do not have benchmarks validate story name in expectations during runs. Created 3 years, 7 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
Index: telemetry/telemetry/story/expectations.py
diff --git a/telemetry/telemetry/story/expectations.py b/telemetry/telemetry/story/expectations.py
index d338f346d5e89863996fb9c033b451d1dc1a8924..b0def23f2515dc4fdc6aa9ba6b431ea36dc73787 100644
--- a/telemetry/telemetry/story/expectations.py
+++ b/telemetry/telemetry/story/expectations.py
@@ -24,11 +24,14 @@ class StoryExpectations(object):
self.SetExpectations()
self._Freeze()
- def ValidateAgainstStorySet(self, story_set):
- stories = [s.display_name for s in story_set.stories]
- for expectation in self._expectations:
- if expectation not in stories:
- raise TypeError('Story %s is not in the story set.' % expectation)
+ def GetBrokenExpectations(self, story_set):
+ story_set_story_names = [s.display_name for s in story_set.stories]
+ invalid_story_names = []
+ for story_name in self._expectations:
+ if story_name not in story_set_story_names:
+ invalid_story_names.append(story_name)
+ logging.error('Story %s is not in the story set.' % story_name)
+ return invalid_story_names
def SetExpectations(self):
"""Sets the Expectations for test disabling

Powered by Google App Engine
This is Rietveld 408576698