OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import optparse | 6 import optparse |
7 import os | 7 import os |
8 import sys | 8 import sys |
9 import time | 9 import time |
10 | 10 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
277 print ('Cannot find browser of type %s. To list out all ' | 277 print ('Cannot find browser of type %s. To list out all ' |
278 'available browsers, rerun your command with ' | 278 'available browsers, rerun your command with ' |
279 '--browser=list' % finder_options.browser_options.browser_type) | 279 '--browser=list' % finder_options.browser_options.browser_type) |
280 return 1 | 280 return 1 |
281 | 281 |
282 can_run_on_platform = benchmark._CanRunOnPlatform(possible_browser.platform, | 282 can_run_on_platform = benchmark._CanRunOnPlatform(possible_browser.platform, |
283 finder_options) | 283 finder_options) |
284 | 284 |
285 # TODO(rnephew): Remove decorators.IsBenchmarkEnabled and IsBenchmarkDisabled | 285 # TODO(rnephew): Remove decorators.IsBenchmarkEnabled and IsBenchmarkDisabled |
286 # when we have fully moved to _CanRunOnPlatform(). | 286 # when we have fully moved to _CanRunOnPlatform(). |
287 permanently_disabled = expectations.IsBenchmarkDisabled( | 287 expectations_disabled = expectations.IsBenchmarkDisabled( |
288 possible_browser.platform, finder_options) | 288 possible_browser.platform, finder_options) |
289 temporarily_disabled = not decorators.IsBenchmarkEnabled( | 289 temporarily_disabled = not decorators.IsBenchmarkEnabled( |
nednguyen
2017/09/25 18:06:35
unrelated but are we ready to get rid of this?
| |
290 benchmark, possible_browser) | 290 benchmark, possible_browser) |
291 | 291 |
292 if permanently_disabled or temporarily_disabled or not can_run_on_platform: | 292 if expectations_disabled or temporarily_disabled or not can_run_on_platform: |
293 print '%s is disabled on the selected browser' % benchmark.Name() | 293 print '%s is disabled on the selected browser' % benchmark.Name() |
294 if finder_options.run_disabled_tests and not permanently_disabled: | 294 if finder_options.run_disabled_tests and can_run_on_platform: |
295 print 'Running benchmark anyway due to: --also-run-disabled-tests' | 295 print 'Running benchmark anyway due to: --also-run-disabled-tests' |
296 else: | 296 else: |
297 print 'Try --also-run-disabled-tests to force the benchmark to run.' | 297 print 'Try --also-run-disabled-tests to force the benchmark to run.' |
298 # If chartjson is specified, this will print a dict indicating the | 298 # If chartjson is specified, this will print a dict indicating the |
299 # benchmark name and disabled state. | 299 # benchmark name and disabled state. |
300 with results_options.CreateResults( | 300 with results_options.CreateResults( |
301 benchmark_metadata, finder_options, | 301 benchmark_metadata, finder_options, |
302 benchmark.ValueCanBeAddedPredicate, benchmark_enabled=False | 302 benchmark.ValueCanBeAddedPredicate, benchmark_enabled=False |
303 ) as results: | 303 ) as results: |
304 results.PrintSummary() | 304 results.PrintSummary() |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
460 reserved_infos.OS_VERSIONS.name: state.platform.GetOSVersionName(), | 460 reserved_infos.OS_VERSIONS.name: state.platform.GetOSVersionName(), |
461 } | 461 } |
462 | 462 |
463 device_info_diangostics = {} | 463 device_info_diangostics = {} |
464 | 464 |
465 for name, value in device_info_data.iteritems(): | 465 for name, value in device_info_data.iteritems(): |
466 if not value: | 466 if not value: |
467 continue | 467 continue |
468 device_info_diangostics[name] = histogram.GenericSet([value]) | 468 device_info_diangostics[name] = histogram.GenericSet([value]) |
469 return device_info_diangostics | 469 return device_info_diangostics |
OLD | NEW |