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

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

Issue 2502363005: [android] Stop using isolate.py for data dependency management. (RELAND) (Closed)
Patch Set: fixed: moved the runtime_deps file. Created 4 years, 1 month 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 4a612b80485781f5ea13569954e89ff81df7cf48..0971d228e065ca0943fdf38b20bf9be01a6e1ca7 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -251,7 +251,7 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
def SetUp(self):
@local_device_environment.handle_shard_failures_with(
on_failure=self._env.BlacklistDevice)
- def individual_device_set_up(dev):
+ def individual_device_set_up(dev, host_device_tuples):
def install_apk():
# Install test APK.
self._delegate.Install(dev)
@@ -259,11 +259,12 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
def push_test_data():
# Push data dependencies.
device_root = self._delegate.GetTestDataRoot(dev)
- data_deps = self._test_instance.GetDataDependencies()
- host_device_tuples = [
- (h, d if d is not None else device_root)
- for h, d in data_deps]
- dev.PushChangedFiles(host_device_tuples, delete_device_stale=True)
+ host_device_tuples_substituted = [
+ (h, local_device_test_run.SubstituteDeviceRoot(d, device_root))
+ for h, d in host_device_tuples]
+ dev.PushChangedFiles(
+ host_device_tuples_substituted,
+ 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)
@@ -289,7 +290,9 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
for step in steps:
step()
- self._env.parallel_devices.pMap(individual_device_set_up)
+ self._env.parallel_devices.pMap(
+ individual_device_set_up,
+ self._test_instance.GetDataDependencies())
#override
def _ShouldShard(self):

Powered by Google App Engine
This is Rietveld 408576698