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

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

Issue 3001873002: [Telemetry] Add CanRunOnPlatform to story_runner and benchmark class. (Closed)
Patch Set: Make Method Private 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..2d07134660311a53ec4b0a0bf57533d788c30013 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().
charliea (OOO until 10-5) 2017/08/22 17:22:18 CanRunOnPlatform
rnephew (Reviews Here) 2017/08/22 17:33:20 Done.
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