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

Unified Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 2044523003: Revert of 👔 Reland of Move side-loaded test data /sdcard -> /sdcard/gtestdata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/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 97b932c9432ceb3104a8573c0545dd28be052a51..4b940dbd11afa95aa4316b69224d3cf3385be12f 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
@@ -4,7 +4,6 @@
import logging
import os
-import posixpath
import re
import time
@@ -59,11 +58,11 @@
return self._test_instance.suite
def SetUp(self):
- def substitute_device_root(d, device_root):
+ def substitute_external_storage(d, external_storage):
if not d:
- return device_root
+ return external_storage
elif isinstance(d, list):
- return posixpath.join(p if p else device_root for p in d)
+ return '/'.join(p if p else external_storage for p in d)
else:
return d
@@ -107,19 +106,14 @@
check_return=True)
def push_test_data():
- device_root = posixpath.join(dev.GetExternalStoragePath(),
- 'chromium_tests_root')
+ external_storage = dev.GetExternalStoragePath()
host_device_tuples_substituted = [
- (h, substitute_device_root(d, device_root))
+ (h, substitute_external_storage(d, external_storage))
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,
- 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)
+ dev.PushChangedFiles(host_device_tuples_substituted)
def create_flag_changer():
if self._test_instance.flags:

Powered by Google App Engine
This is Rietveld 408576698