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

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

Issue 1926793002: 👔 Move side-loaded test data /sdcard -> /sdcard/gtestdata (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cast compile Created 4 years, 8 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_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 a723cfe6726fdb48ec414402d70bcfa0f49687a3..0fe002029a19fe876582a01f2fcd9f6b862a2962 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -240,12 +240,14 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
def push_test_data():
# Push data dependencies.
- external_storage = dev.GetExternalStoragePath()
+ device_root = posixpath.join(dev.GetExternalStoragePath(), 'gtestdata')
data_deps = self._test_instance.GetDataDependencies()
host_device_tuples = [
- (h, d if d is not None else external_storage)
+ (h, d if d is not None else device_root)
for h, d in data_deps]
- dev.PushChangedFiles(host_device_tuples)
+ dev.PushChangedFiles(host_device_tuples, delete_device_stale=True)
+ if not host_device_tuples:
+ dev.RunShellCommand('r=%s;rm -rf $r;mkdir -p $r' % device_root)
jbudorick 2016/04/27 19:59:01 I'm assuming this is the motivation for gtestdata.
agrieve 2016/04/27 20:26:31 The delete_device_stale=True part is the motivatio
jbudorick 2016/04/27 20:41:36 I meant the rm -rf portion more than the mkdir por
agrieve 2016/04/29 15:56:35 Alright, I don't think this will be a case that sl
def init_tool_and_start_servers():
tool = self.GetTool(dev)

Powered by Google App Engine
This is Rietveld 408576698