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

Side by Side Diff: tools/telemetry/telemetry/page/page_runner.py

Issue 230373005: Telemetry: Skip page if a page action is not supported by the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: print warning on addSkip Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_test_results.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 collections 5 import collections
6 import copy 6 import copy
7 import glob 7 import glob
8 import logging 8 import logging
9 import os 9 import os
10 import random 10 import random
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 else: 488 else:
489 logging.warning('%s:\n%s', page.url, traceback.format_exc()) 489 logging.warning('%s:\n%s', page.url, traceback.format_exc())
490 results.AddFailure(page, sys.exc_info()) 490 results.AddFailure(page, sys.exc_info())
491 except (util.TimeoutException, exceptions.LoginException, 491 except (util.TimeoutException, exceptions.LoginException,
492 exceptions.ProfilingException): 492 exceptions.ProfilingException):
493 ProcessError() 493 ProcessError()
494 except (exceptions.TabCrashException, exceptions.BrowserGoneException): 494 except (exceptions.TabCrashException, exceptions.BrowserGoneException):
495 ProcessError() 495 ProcessError()
496 # Run() catches these exceptions to relaunch the tab/browser, so re-raise. 496 # Run() catches these exceptions to relaunch the tab/browser, so re-raise.
497 raise 497 raise
498 except page_action.PageActionNotSupported as e:
499 results.AddSkip(page, 'Unsupported page action: %s' % e)
498 except Exception: 500 except Exception:
499 logging.warning('While running %s', page.url) 501 logging.warning('While running %s', page.url)
500 exception_formatter.PrintFormattedException(*sys.exc_info()) 502 exception_formatter.PrintFormattedException(*sys.exc_info())
501 results.AddFailure(page, sys.exc_info()) 503 results.AddFailure(page, sys.exc_info())
502 else: 504 else:
503 if expectation == 'fail': 505 if expectation == 'fail':
504 logging.warning('%s was expected to fail, but passed.\n', page.url) 506 logging.warning('%s was expected to fail, but passed.\n', page.url)
505 results.AddSuccess(page) 507 results.AddSuccess(page)
506 finally: 508 finally:
507 page_state.CleanUpPage(test) 509 page_state.CleanUpPage(test)
(...skipping 26 matching lines...) Expand all
534 logging.error('Device is thermally throttled before running ' 536 logging.error('Device is thermally throttled before running '
535 'performance tests, results will vary.') 537 'performance tests, results will vary.')
536 538
537 539
538 def _CheckThermalThrottling(platform): 540 def _CheckThermalThrottling(platform):
539 if not platform.CanMonitorThermalThrottling(): 541 if not platform.CanMonitorThermalThrottling():
540 return 542 return
541 if platform.HasBeenThermallyThrottled(): 543 if platform.HasBeenThermallyThrottled():
542 logging.error('Device has been thermally throttled during ' 544 logging.error('Device has been thermally throttled during '
543 'performance tests, results will vary.') 545 'performance tests, results will vary.')
OLDNEW
« no previous file with comments | « no previous file | tools/telemetry/telemetry/page/page_test_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698