Index: build/android/pylib/local/device/local_device_gtest_run.py |
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py |
index caef0548d2daf93f7dc392449f7d935df0851632..675d191b4cdd58d8f9dbf413dd5eaa75687fc9a6 100644 |
--- a/build/android/pylib/local/device/local_device_gtest_run.py |
+++ b/build/android/pylib/local/device/local_device_gtest_run.py |
@@ -306,7 +306,10 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun): |
if self._test_instance.app_files: |
self._delegate.PullAppFiles(device, self._test_instance.app_files, |
self._test_instance.app_file_dir) |
- self._delegate.Clear(device) |
+ # Clearing data when using incremental install wipes out cached optimized |
+ # dex files (and shouldn't be necessary by tests anyways). |
+ if not self._env.incremental_install: |
+ self._delegate.Clear(device) |
# Parse the output. |
# TODO(jbudorick): Transition test scripts away from parsing stdout. |