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

Unified Diff: build/android/pylib/gtest/setup.py

Issue 651923002: [Android] Push gtest deps in gtest/setup.py. (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 | « no previous file | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/setup.py
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 1e52d3b8b9cf239c9019234f29f7454d1fb3de97..61a8539a16a1a738141a65b5872327513f793673 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -14,9 +14,11 @@ import sys
from pylib import cmd_helper
from pylib import constants
+from pylib import valgrind_tools
from pylib.base import base_test_result
from pylib.base import test_dispatcher
+from pylib.device import device_utils
from pylib.gtest import test_package_apk
from pylib.gtest import test_package_exe
from pylib.gtest import test_runner
@@ -287,6 +289,19 @@ def _FilterDisabledTests(tests, suite_name, has_gtest_filter):
return tests
+def PushDataDeps(device, test_options, test_package):
+ valgrind_tools.PushFilesForTool(test_options.tool, device)
+ if os.path.exists(constants.ISOLATE_DEPS_DIR):
+ device_dir = (
+ constants.TEST_EXECUTABLE_DIR
+ if test_package.suite_name == 'breakpad_unittests'
+ else device.GetExternalStoragePath())
+ device.PushChangedFiles([
+ (os.path.join(constants.ISOLATE_DEPS_DIR, p),
+ '%s/%s' % (device_dir, p))
+ for p in os.listdir(constants.ISOLATE_DEPS_DIR)])
+
+
def Setup(test_options, devices):
"""Create the test runner factory and tests.
@@ -314,6 +329,9 @@ def Setup(test_options, devices):
_GenerateDepsDirUsingIsolate(test_options.suite_name,
test_options.isolate_file_path)
+ device_utils.DeviceUtils.parallel(devices).pMap(
+ PushDataDeps, test_options, test_package)
+
tests = _GetTests(test_options, test_package, devices)
# Constructs a new TestRunner with the current options.
« no previous file with comments | « no previous file | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698