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

Side by Side Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 1860323002: [Android] Handle exceptions thrown during instrumentation test teardown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 re 6 import re
7 import time 7 import time
8 8
9 from devil.android import device_errors 9 from devil.android import device_errors
10 from devil.android import flag_changer 10 from devil.android import flag_changer
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 reraiser_thread.RunAsync(steps) 134 reraiser_thread.RunAsync(steps)
135 else: 135 else:
136 for step in steps: 136 for step in steps:
137 step() 137 step()
138 138
139 self._env.parallel_devices.pMap( 139 self._env.parallel_devices.pMap(
140 individual_device_set_up, 140 individual_device_set_up,
141 self._test_instance.GetDataDependencies()) 141 self._test_instance.GetDataDependencies())
142 142
143 def TearDown(self): 143 def TearDown(self):
144 @local_device_test_run.handle_shard_failures_with(
145 self._env.BlacklistDevice)
144 def individual_device_tear_down(dev): 146 def individual_device_tear_down(dev):
145 if str(dev) in self._flag_changers: 147 if str(dev) in self._flag_changers:
146 self._flag_changers[str(dev)].Restore() 148 self._flag_changers[str(dev)].Restore()
147 149
148 # Remove package-specific configuration 150 # Remove package-specific configuration
149 dev.RunShellCommand(['am', 'clear-debug-app'], check_return=True) 151 dev.RunShellCommand(['am', 'clear-debug-app'], check_return=True)
150 152
151 valgrind_tools.SetChromeTimeoutScale(dev, None) 153 valgrind_tools.SetChromeTimeoutScale(dev, None)
152 154
153 self._env.parallel_devices.pMap(individual_device_tear_down) 155 self._env.parallel_devices.pMap(individual_device_tear_down)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 timeout = v 286 timeout = v
285 break 287 break
286 else: 288 else:
287 logging.warning('Using default 1 minute timeout for %s', test_name) 289 logging.warning('Using default 1 minute timeout for %s', test_name)
288 timeout = 60 290 timeout = 60
289 291
290 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) 292 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations)
291 293
292 return timeout 294 return timeout
293 295
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