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

Unified Diff: build/android/pylib/instrumentation/test_runner.py

Issue 647013002: [Android] Reland of 'Add zip pushing and refine push mode selection.' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | build/android/pylib/uiautomator/test_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/test_runner.py
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index 4f8cdcf304a1ff234415a93a9d279c9ecffdf649..39b0b0c8efd68feed9f6bf1259ee940977d4cbaa 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -99,14 +99,15 @@ class TestRunner(base_test_runner.BaseTestRunner):
str(self.device))
return
+ host_device_file_tuples = []
test_data = _GetDataFilesForTestSuite(self.test_pkg.GetApkName())
if test_data:
# Make sure SD card is ready.
self.device.WaitUntilFullyBooted(timeout=20)
- for p in test_data:
- self.device.PushChangedFiles(
- os.path.join(constants.DIR_SOURCE_ROOT, p),
- os.path.join(self.device.GetExternalStoragePath(), p))
+ host_device_file_tuples += [
+ (os.path.join(constants.DIR_SOURCE_ROOT, p),
+ os.path.join(self.device.GetExternalStoragePath(), p))
+ for p in test_data]
# TODO(frankf): Specify test data in this file as opposed to passing
# as command-line.
@@ -117,12 +118,14 @@ class TestRunner(base_test_runner.BaseTestRunner):
host_test_files_path = os.path.join(constants.DIR_SOURCE_ROOT,
host_src)
if os.path.exists(host_test_files_path):
- self.device.PushChangedFiles(
+ host_device_file_tuples += [(
host_test_files_path,
'%s/%s/%s' % (
self.device.GetExternalStoragePath(),
TestRunner._DEVICE_DATA_DIR,
- dst_layer))
+ dst_layer))]
+ if host_device_file_tuples:
+ self.device.PushChangedFiles(host_device_file_tuples)
self.tool.CopyFiles()
TestRunner._DEVICE_HAS_TEST_FILES[str(self.device)] = True
« no previous file with comments | « build/android/pylib/gtest/test_runner.py ('k') | build/android/pylib/uiautomator/test_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698