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

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

Issue 1570043004: Adds --skip-clear-data flag to android's test_runner.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update todo Created 4 years, 10 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
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 collections 5 import collections
6 import imp 6 import imp
7 import itertools 7 import itertools
8 import os 8 import os
9 import posixpath 9 import posixpath
10 10
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 timeout = (self._test_instance.shard_timeout 338 timeout = (self._test_instance.shard_timeout
339 * self.GetTool(device).GetTimeoutScale()) 339 * self.GetTool(device).GetTimeoutScale())
340 output = self._delegate.Run( 340 output = self._delegate.Run(
341 test, device, flags=self._test_instance.test_arguments, 341 test, device, flags=self._test_instance.test_arguments,
342 timeout=timeout, retries=0) 342 timeout=timeout, retries=0)
343 for s in self._servers[str(device)]: 343 for s in self._servers[str(device)]:
344 s.Reset() 344 s.Reset()
345 if self._test_instance.app_files: 345 if self._test_instance.app_files:
346 self._delegate.PullAppFiles(device, self._test_instance.app_files, 346 self._delegate.PullAppFiles(device, self._test_instance.app_files,
347 self._test_instance.app_file_dir) 347 self._test_instance.app_file_dir)
348 # Clearing data when using incremental install wipes out cached optimized 348 if not self._test_instance.skip_clear_data:
349 # dex files (and shouldn't be necessary by tests anyways).
350 if not self._env.incremental_install:
351 self._delegate.Clear(device) 349 self._delegate.Clear(device)
352 350
353 # Parse the output. 351 # Parse the output.
354 # TODO(jbudorick): Transition test scripts away from parsing stdout. 352 # TODO(jbudorick): Transition test scripts away from parsing stdout.
355 results = self._test_instance.ParseGTestOutput(output) 353 results = self._test_instance.ParseGTestOutput(output)
356 return results 354 return results
357 355
358 #override 356 #override
359 def TearDown(self): 357 def TearDown(self):
360 @local_device_test_run.handle_shard_failures 358 @local_device_test_run.handle_shard_failures
361 def individual_device_tear_down(dev): 359 def individual_device_tear_down(dev):
362 for s in self._servers.get(str(dev), []): 360 for s in self._servers.get(str(dev), []):
363 s.TearDown() 361 s.TearDown()
364 362
365 tool = self.GetTool(dev) 363 tool = self.GetTool(dev)
366 tool.CleanUpEnvironment() 364 tool.CleanUpEnvironment()
367 365
368 self._env.parallel_devices.pMap(individual_device_tear_down) 366 self._env.parallel_devices.pMap(individual_device_tear_down)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698