OLD | NEW |
---|---|
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 Loading... | |
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 self._RestartBrowser('failure in setup') | |
nednguyen
2016/07/14 19:04:12
We still should add "raise" after this so the exce
Ken Russell (switch to Gerrit)
2016/07/14 23:06:17
Is failing the test a good idea? setUp() is called
nednguyen
2016/07/14 23:10:01
As you mention the problem of marking test flaky &
nednguyen
2016/07/14 23:16:47
Though people can always subclass GpuIntegrationTe
Ken Russell (switch to Gerrit)
2016/07/15 01:10:37
OK. Let's start by adding:
if not self.tab:
nednguyen
2016/07/15 01:39:55
We can use what's similar to https://cs.chromium.o
eyaich
2016/07/15 13:30:27
So I see one problem with this workflow.
The or
| |
OLD | NEW |