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

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

Issue 3001873002: [Telemetry] Add CanRunOnPlatform to story_runner and benchmark class. (Closed)
Patch Set: Charlies comments 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
« no previous file with comments | « telemetry/telemetry/benchmark_unittest.py ('k') | telemetry/telemetry/internal/story_runner_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1bf512d431384045bd08e8b972b4f88f3ec01d30 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'
« no previous file with comments | « telemetry/telemetry/benchmark_unittest.py ('k') | telemetry/telemetry/internal/story_runner_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698