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

Unified Diff: build/android/pylib/gtest/gtest_test_instance.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/gtest/gtest_test_instance.py
diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py
index 9cf76a277f4233fcbf546b9c54e0fad4e9597555..40de2d6f0116699647fa5815349e0501a76461f1 100644
--- a/build/android/pylib/gtest/gtest_test_instance.py
+++ b/build/android/pylib/gtest/gtest_test_instance.py
@@ -14,7 +14,6 @@ from pylib import constants
from pylib.constants import host_paths
from pylib.base import base_test_result
from pylib.base import test_instance
-from pylib.utils import isolator
with host_paths.SysPath(host_paths.BUILD_COMMON_PATH):
import unittest_util # pylint: disable=import-error
@@ -230,7 +229,7 @@ def ConvertTestFilterFileIntoGTestFilterArgument(input_lines):
class GtestTestInstance(test_instance.TestInstance):
- def __init__(self, args, isolate_delegate, error_func):
+ def __init__(self, args, data_deps_delegate, error_func):
super(GtestTestInstance, self).__init__()
# TODO(jbudorick): Support multiple test suites.
if len(args.suite_name) > 1:
@@ -287,16 +286,10 @@ class GtestTestInstance(test_instance.TestInstance):
else:
self._gtest_filter = None
- if (args.isolate_file_path and
- not isolator.IsIsolateEmpty(args.isolate_file_path)):
- self._isolate_abs_path = os.path.abspath(args.isolate_file_path)
- self._isolate_delegate = isolate_delegate
- self._isolated_abs_path = os.path.join(
- constants.GetOutDirectory(), '%s.isolated' % self._suite)
- else:
- logging.warning('%s isolate file provided. No data deps will be pushed.',
- 'Empty' if args.isolate_file_path else 'No')
- self._isolate_delegate = None
+ self._data_deps_delegate = data_deps_delegate
+ self._runtime_deps_path = args.runtime_deps_path
+ if not self._runtime_deps_path:
+ logging.warning('No data dependencies will be pushed.')
if args.app_data_files:
self._app_data_files = args.app_data_files
@@ -393,15 +386,8 @@ class GtestTestInstance(test_instance.TestInstance):
#override
def SetUp(self):
"""Map data dependencies via isolate."""
- if self._isolate_delegate:
- self._isolate_delegate.Remap(
- self._isolate_abs_path, self._isolated_abs_path)
- self._isolate_delegate.PurgeExcluded(_DEPS_EXCLUSION_LIST)
- self._isolate_delegate.MoveOutputDeps()
- dest_dir = None
- self._data_deps.extend([
- (self._isolate_delegate.isolate_deps_dir, dest_dir)])
-
+ self._data_deps.extend(
+ self._data_deps_delegate(self._runtime_deps_path))
def GetDataDependencies(self):
"""Returns the test suite's data dependencies.
@@ -455,7 +441,6 @@ class GtestTestInstance(test_instance.TestInstance):
#override
def TearDown(self):
- """Clear the mappings created by SetUp."""
- if self._isolate_delegate:
- self._isolate_delegate.Clear()
+ """Do nothing."""
+ pass

Powered by Google App Engine
This is Rietveld 408576698