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

Unified Diff: build/android/pylib/instrumentation/test_runner.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, 11 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/instrumentation/test_runner.py
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index b4bbb621ce131225ac7754e79057b99d2d84808a..795e8171ae1d301ab4305244827f6cbd051d3e93 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -229,11 +229,12 @@ class TestRunner(base_test_runner.BaseTestRunner):
self.coverage_device_file, self.coverage_host_file)
self.device.RunShellCommand(
'rm -f %s' % self.coverage_device_file)
- elif self.package_info:
+ elif self.package_info and not self.options.skip_clear_data:
apk_under_test = self.test_pkg.GetApkUnderTest()
permissions = apk_under_test.GetPermissions() if apk_under_test else None
self.device.ClearApplicationState(
self.package_info.package, permissions=permissions)
+ self.device.ClearApplicationState(self.package_info.package)
def TearDownPerfMonitoring(self, test):
"""Cleans up performance monitoring if the specified test required it.
« no previous file with comments | « build/android/pylib/instrumentation/test_options.py ('k') | build/android/pylib/local/device/local_device_gtest_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698