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

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

Issue 23726017: Telemetry: Catch LookupError exception and mark as failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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 import collections 4 import collections
5 import glob 5 import glob
6 import logging 6 import logging
7 import os 7 import os
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 import time 10 import time
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 else: 384 else:
385 results.AddError(page, sys.exc_info()) 385 results.AddError(page, sys.exc_info())
386 386
387 try: 387 try:
388 page_state.PreparePage(page, tab, test) 388 page_state.PreparePage(page, tab, test)
389 if state.repeat_state.ShouldNavigate( 389 if state.repeat_state.ShouldNavigate(
390 finder_options.skip_navigate_on_repeat): 390 finder_options.skip_navigate_on_repeat):
391 page_state.ImplicitPageNavigation(page, tab, test) 391 page_state.ImplicitPageNavigation(page, tab, test)
392 test.Run(finder_options, page, tab, results) 392 test.Run(finder_options, page, tab, results)
393 util.CloseConnections(tab) 393 util.CloseConnections(tab)
394 except page_test.Failure: 394 except (page_test.Failure, LookupError):
395 logging.warning('%s:\n%s', page.url, traceback.format_exc()) 395 logging.warning('%s:\n%s', page.url, traceback.format_exc())
396 if expectation == 'fail': 396 if expectation == 'fail':
397 logging.info('Failure was expected\n') 397 logging.info('Failure was expected\n')
398 results.AddSuccess(page) 398 results.AddSuccess(page)
399 else: 399 else:
400 results.AddFailure(page, sys.exc_info()) 400 results.AddFailure(page, sys.exc_info())
401 except (util.TimeoutException, exceptions.LoginException, 401 except (util.TimeoutException, exceptions.LoginException,
402 exceptions.ProfilingException): 402 exceptions.ProfilingException):
403 ProcessError() 403 ProcessError()
404 except (exceptions.TabCrashException, exceptions.BrowserGoneException): 404 except (exceptions.TabCrashException, exceptions.BrowserGoneException):
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 logging.error('Device is thermally throttled before running ' 442 logging.error('Device is thermally throttled before running '
443 'performance tests, results will vary.') 443 'performance tests, results will vary.')
444 444
445 445
446 def _CheckThermalThrottling(platform): 446 def _CheckThermalThrottling(platform):
447 if not platform.CanMonitorThermalThrottling(): 447 if not platform.CanMonitorThermalThrottling():
448 return 448 return
449 if platform.HasBeenThermallyThrottled(): 449 if platform.HasBeenThermallyThrottled():
450 logging.error('Device has been thermally throttled during ' 450 logging.error('Device has been thermally throttled during '
451 'performance tests, results will vary.') 451 'performance tests, results will vary.')
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698