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

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

Issue 2885173004: [Telemetry] Rename DisableBenchmark to PermenantlyDisableBenchmark in StoryExpectations (Closed)
Patch Set: add more documentation 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
« no previous file with comments | « no previous file | telemetry/telemetry/story/expectations_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/story/expectations.py
diff --git a/telemetry/telemetry/story/expectations.py b/telemetry/telemetry/story/expectations.py
index c9b29ffc9d699aa7ec3038b2dc437ae252e93261..b18aada51f43bc50acf539093346075e5106b579 100644
--- a/telemetry/telemetry/story/expectations.py
+++ b/telemetry/telemetry/story/expectations.py
@@ -11,8 +11,8 @@ class StoryExpectations(object):
Example Usage:
class FooBenchmarkExpectations(expectations.StoryExpectations):
def SetExpectations(self):
- self.DisableBenchmark([expectations.ALL_WIN], 'crbug.com/123')
- self.DisableBenchmark([expectations.ALL_MOBILE], 'Desktop Benchmark')
+ self.PermanentlyDisableBenchmark(
+ [expectations.ALL_MOBILE], 'Desktop Benchmark')
self.DisableStory('story_name1', [expectations.ALL_MAC], 'crbug.com/456')
self.DisableStory('story_name2', [expectations.ALL], 'crbug.com/789')
...
@@ -33,12 +33,17 @@ class StoryExpectations(object):
def _Freeze(self):
self._frozen = True
- def DisableBenchmark(self, conditions, reason):
- """Disable benchmark under the given conditions.
+ def PermanentlyDisableBenchmark(self, conditions, reason):
+ """Permanently Disable benchmark under the given conditions.
+
+ This means that even if --also-run-disabled-tests is passed, the benchmark
+ will not run. Some benchmarks (such as system_health.mobile_* benchmarks)
+ contain android specific commands and as such, cannot run on desktop
+ platforms under any condition.
Example:
- DisableBenchmark([expectations.ALL_MOBILE], 'Desktop benchmark')
- DisableBenchmark([expectations.ALL_WIN], 'crbug.com/123')
+ PermanentlyDisableBenchmark(
+ [expectations.ALL_MOBILE], 'Desktop benchmark')
Args:
conditions: List of _TestCondition subclasses.
@@ -61,7 +66,7 @@ class StoryExpectations(object):
for conditions, reason in self._disabled_platforms:
for condition in conditions:
if condition.ShouldDisable(platform):
- logging.info('Benchmark disabled on %s due to %s.',
+ logging.info('Benchmark permanently disabled on %s due to %s.',
condition, reason)
return reason
return None
« no previous file with comments | « no previous file | telemetry/telemetry/story/expectations_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698