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

Unified Diff: telemetry/telemetry/internal/story_runner.py

Issue 3001873002: [Telemetry] Add CanRunOnPlatform to story_runner and benchmark class. (Closed)
Patch Set: unit tests Created 3 years, 4 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/internal/story_runner.py
diff --git a/telemetry/telemetry/internal/story_runner.py b/telemetry/telemetry/internal/story_runner.py
index 8928068ab3bdf89aaefb16edf51c7007a27ed7ea..610a50b890b5fd73a9ff2529ccf2ab954104c907 100644
--- a/telemetry/telemetry/internal/story_runner.py
+++ b/telemetry/telemetry/internal/story_runner.py
@@ -279,13 +279,17 @@ def RunBenchmark(benchmark, finder_options):
'--browser=list' % finder_options.browser_options.browser_type)
return 1
+ can_run_on_platform = benchmark.CanRunOnPlatform(possible_browser.platform,
+ finder_options)
+
+ # TODO(rnephew): Remove decorators.IsBenchmarkEnabled and IsBenchmarkDisabled
+ # when we have fully moved to CanRunonPlatform().
permanently_disabled = expectations.IsBenchmarkDisabled(
possible_browser.platform, finder_options)
- # TODO(rnephew): Remove decorators.IsBenchmarkEnabled when deprecated.
temporarily_disabled = not decorators.IsBenchmarkEnabled(
benchmark, possible_browser)
- if permanently_disabled or temporarily_disabled:
+ if permanently_disabled or temporarily_disabled or not can_run_on_platform:
print '%s is disabled on the selected browser' % benchmark.Name()
if finder_options.run_disabled_tests and not permanently_disabled:
print 'Running benchmark anyway due to: --also-run-disabled-tests'

Powered by Google App Engine
This is Rietveld 408576698