Chromium Code Reviews

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: Was passing due to stale files on my /sdcard. Now should be fixed. QuicTestServer had a ref to e::a… Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
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 2630af9e37a04cb25fd692ac3e8b8b455c9847f3..9486d88a0b7c6d414a7afe0441f2bc38fbbbd467 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -241,12 +241,16 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
def push_test_data():
# Push data dependencies.
- external_storage = dev.GetExternalStoragePath()
+ device_root = posixpath.join(dev.GetExternalStoragePath(),
+ 'chromium_tests_root')
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(['rm', '-rf', device_root], check_return=True)
+ dev.RunShellCommand(['mkdir', '-p', device_root], check_return=True)
def init_tool_and_start_servers():
tool = self.GetTool(dev)
« no previous file with comments | « base/test/test_support_android.cc ('k') | build/android/pylib/local/device/local_device_instrumentation_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine