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

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

Issue 294033003: Added --isolate-file-path option to android test_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added --isolate-file-path option Created 6 years, 7 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_options.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 097e283f800712d83f4ba64a89a562030c1a1a52..4c767787511089f1ee8042f8925a93fd1b828a7a 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -92,21 +92,30 @@ _ISOLATE_SCRIPT = os.path.join(
constants.DIR_SOURCE_ROOT, 'tools', 'swarming_client', 'isolate.py')
-def _GenerateDepsDirUsingIsolate(suite_name):
+def _GenerateDepsDirUsingIsolate(suite_name, isolate_file_path=None):
"""Generate the dependency dir for the test suite using isolate.
Args:
suite_name: Name of the test suite (e.g. base_unittests).
+ isolate_file_path: .isolate file path to use. If there is a default .isolate
+ file path for the suite_name, this will override it.
"""
if os.path.isdir(constants.ISOLATE_DEPS_DIR):
shutil.rmtree(constants.ISOLATE_DEPS_DIR)
- isolate_rel_path = _ISOLATE_FILE_PATHS.get(suite_name)
- if not isolate_rel_path:
- logging.info('Did not find an isolate file for the test suite.')
- return
+ if isolate_file_path:
+ if os.path.isabs(isolate_file_path):
+ isolate_abs_path = isolate_file_path
+ else:
+ isolate_abs_path = os.path.join(constants.DIR_SOURCE_ROOT,
+ isolate_file_path)
+ else:
+ isolate_rel_path = _ISOLATE_FILE_PATHS.get(suite_name)
+ if not isolate_rel_path:
+ logging.info('Did not find an isolate file for the test suite.')
+ return
+ isolate_abs_path = os.path.join(constants.DIR_SOURCE_ROOT, isolate_rel_path)
- isolate_abs_path = os.path.join(constants.DIR_SOURCE_ROOT, isolate_rel_path)
isolated_abs_path = os.path.join(
constants.GetOutDirectory(), '%s.isolated' % suite_name)
assert os.path.exists(isolate_abs_path)
@@ -309,7 +318,8 @@ def Setup(test_options, devices):
% test_options.suite_name)
logging.warning('Found target %s', test_package.suite_path)
- _GenerateDepsDirUsingIsolate(test_options.suite_name)
+ _GenerateDepsDirUsingIsolate(test_options.suite_name,
+ test_options.isolate_file_path)
tests = _GetTests(test_options, test_package, devices)
« no previous file with comments | « no previous file | build/android/pylib/gtest/test_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698