| Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| index 2d574de1fd2017149062cb63c9c4eb12e6023bad..2526458cb749a086ab013b5a82bbf69ae63143b7 100644
|
| --- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| +++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
|
| @@ -3,6 +3,7 @@
|
| # found in the LICENSE file.
|
|
|
| import logging
|
| +import posixpath
|
| import re
|
| import time
|
|
|
| @@ -57,11 +58,11 @@ class LocalDeviceInstrumentationTestRun(
|
| return self._test_instance.suite
|
|
|
| def SetUp(self):
|
| - def substitute_external_storage(d, external_storage):
|
| + def substitute_device_root(d, device_root):
|
| if not d:
|
| - return external_storage
|
| + return device_root
|
| elif isinstance(d, list):
|
| - return '/'.join(p if p else external_storage for p in d)
|
| + return posixpath.join(p if p else device_root for p in d)
|
| else:
|
| return d
|
|
|
| @@ -105,14 +106,19 @@ class LocalDeviceInstrumentationTestRun(
|
| check_return=True)
|
|
|
| def push_test_data():
|
| - external_storage = dev.GetExternalStoragePath()
|
| + device_root = posixpath.join(dev.GetExternalStoragePath(),
|
| + 'chromium_tests_root')
|
| host_device_tuples_substituted = [
|
| - (h, substitute_external_storage(d, external_storage))
|
| + (h, substitute_device_root(d, device_root))
|
| for h, d in host_device_tuples]
|
| logging.info('instrumentation data deps:')
|
| for h, d in host_device_tuples_substituted:
|
| logging.info('%r -> %r', h, d)
|
| - dev.PushChangedFiles(host_device_tuples_substituted)
|
| + dev.PushChangedFiles(host_device_tuples_substituted,
|
| + delete_device_stale=True)
|
| + if not host_device_tuples_substituted:
|
| + dev.RunShellCommand(['rm', '-rf', device_root], check_return=True)
|
| + dev.RunShellCommand(['mkdir', '-p', device_root], check_return=True)
|
|
|
| def create_flag_changer():
|
| if self._test_instance.flags:
|
|
|