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

Side by Side Diff: content/test/gpu/gpu_tests/gpu_integration_test.py

Issue 2151983002: Adding logic to restart the browser if there is an exception (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding exception logging on failure Created 4 years, 5 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 | content/test/gpu/gpu_tests/gpu_integration_test_unittest.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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 6
7 from telemetry.testing import serially_executed_browser_test_case 7 from telemetry.testing import serially_executed_browser_test_case
8 8
9 from gpu_tests import exception_formatter 9 from gpu_tests import exception_formatter
10 from gpu_tests import gpu_test_expectations 10 from gpu_tests import gpu_test_expectations
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 @classmethod 120 @classmethod
121 def _CreateExpectations(cls): 121 def _CreateExpectations(cls):
122 # Subclasses **must** override this in order to provide their test 122 # Subclasses **must** override this in order to provide their test
123 # expectations to the harness. 123 # expectations to the harness.
124 # 124 #
125 # Do not call this directly. Call GetExpectations where necessary. 125 # Do not call this directly. Call GetExpectations where necessary.
126 raise NotImplementedError 126 raise NotImplementedError
127 127
128 def setUp(self): 128 def setUp(self):
129 self.tab = self.browser.tabs[0] 129 try:
130 self.tab = self.browser.tabs[0]
131 except Exception:
132 # restart the browser to make sure a failure in a test doesn't
133 # propagate to the next test iteration.
134 logging.exception("Failure during browser startup")
135 self._RestartBrowser('failure in setup')
nednguyen 2016/07/21 18:01:55 I still think we should reraise after this, otherw
eyaich 2016/07/21 18:35:36 The failure is on the test prior, so the exception
nednguyen 2016/07/21 18:40:30 I think that we may still have case in which: tes
eyaich 2016/07/21 18:48:02 How would test N+1's setUp fail unless tab[0] wasn
nednguyen 2016/07/21 18:57:51 Note that all the communication between telemetry
eyaich 2016/07/21 19:04:09 Ok I agree that not reporting an error at all is w
OLDNEW
« no previous file with comments | « no previous file | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698