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

Unified Diff: tools/telemetry/telemetry/results/page_test_results.py

Issue 1011893002: [Telemetry] Modify ValueCanBeAddedPredicate so it cannot filter out skip & failure value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Kari's comment Created 5 years, 9 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 | tools/telemetry/telemetry/results/page_test_results_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/results/page_test_results.py
diff --git a/tools/telemetry/telemetry/results/page_test_results.py b/tools/telemetry/telemetry/results/page_test_results.py
index 38b62e448bfdfdc43a322f4df8f9e66d7aa0b540..21e8e7c5800e8cc485bce20cace373747b89a51e 100644
--- a/tools/telemetry/telemetry/results/page_test_results.py
+++ b/tools/telemetry/telemetry/results/page_test_results.py
@@ -37,9 +37,10 @@ class PageTestResults(object):
output_dir: A string specified the directory where to store the test
artifacts, e.g: trace, videos,...
value_can_be_added_predicate: A function that takes two arguments:
- a value.Value instance and a boolean (True when the value is part
- of the first result for the user story). It returns True if the value
- can be added to the test results and False otherwise.
+ a value.Value instance (except value.FailureValue & value.SkipValue)
+ and a boolean (True when the value is part of the first result for
+ the user story). It returns True if the value can be added to the
+ test results and False otherwise.
"""
# TODO(chrishenry): Figure out if trace_tag is still necessary.
@@ -171,7 +172,9 @@ class PageTestResults(object):
self._ValidateValue(value)
is_first_result = (
self._current_page_run.user_story not in self._all_user_stories)
- if not self._value_can_be_added_predicate(value, is_first_result):
+ if not (isinstance(value, skip.SkipValue) or
+ isinstance(value, failure.FailureValue) or
+ self._value_can_be_added_predicate(value, is_first_result)):
return
# TODO(eakuefner/chrishenry): Add only one skip per pagerun assert here
self._current_page_run.AddValue(value)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/results/page_test_results_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698