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

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

Issue 1414923003: Android GTest Runner: Don't clear app data for incremental installs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 imp 5 import imp
6 import itertools 6 import itertools
7 import os 7 import os
8 import posixpath 8 import posixpath
9 9
10 from devil.android import device_errors 10 from devil.android import device_errors
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 # Run the test. 299 # Run the test.
300 timeout = (self._test_instance.shard_timeout 300 timeout = (self._test_instance.shard_timeout
301 * self.GetTool(device).GetTimeoutScale()) 301 * self.GetTool(device).GetTimeoutScale())
302 output = self._delegate.Run( 302 output = self._delegate.Run(
303 test, device, timeout=timeout, retries=0) 303 test, device, timeout=timeout, retries=0)
304 for s in self._servers[str(device)]: 304 for s in self._servers[str(device)]:
305 s.Reset() 305 s.Reset()
306 if self._test_instance.app_files: 306 if self._test_instance.app_files:
307 self._delegate.PullAppFiles(device, self._test_instance.app_files, 307 self._delegate.PullAppFiles(device, self._test_instance.app_files,
308 self._test_instance.app_file_dir) 308 self._test_instance.app_file_dir)
309 self._delegate.Clear(device) 309 # Clearing data when using incremental install wipes out cached optimized
310 # dex files (and shouldn't be necessary by tests anyways).
311 if not self._env.incremental_install:
312 self._delegate.Clear(device)
310 313
311 # Parse the output. 314 # Parse the output.
312 # TODO(jbudorick): Transition test scripts away from parsing stdout. 315 # TODO(jbudorick): Transition test scripts away from parsing stdout.
313 results = self._test_instance.ParseGTestOutput(output) 316 results = self._test_instance.ParseGTestOutput(output)
314 return results 317 return results
315 318
316 #override 319 #override
317 def TearDown(self): 320 def TearDown(self):
318 @local_device_test_run.handle_shard_failures 321 @local_device_test_run.handle_shard_failures
319 def individual_device_tear_down(dev): 322 def individual_device_tear_down(dev):
320 for s in self._servers.get(str(dev), []): 323 for s in self._servers.get(str(dev), []):
321 s.TearDown() 324 s.TearDown()
322 325
323 tool = self.GetTool(dev) 326 tool = self.GetTool(dev)
324 tool.CleanUpEnvironment() 327 tool.CleanUpEnvironment()
325 328
326 self._env.parallel_devices.pMap(individual_device_tear_down) 329 self._env.parallel_devices.pMap(individual_device_tear_down)
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