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

Unified Diff: build/android/pylib/instrumentation/instrumentation_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/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 566eb6ead7649ecd8e829042d075d13e4038dc41..f8d37e76c0223bc5b3f001268120ccd5cbca42e7 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -18,7 +18,6 @@ from pylib.base import test_instance
from pylib.constants import host_paths
from pylib.instrumentation import test_result
from pylib.instrumentation import instrumentation_parser
-from pylib.utils import isolator
from pylib.utils import proguard
with host_paths.SysPath(host_paths.BUILD_COMMON_PATH):
@@ -400,7 +399,7 @@ def GetUniqueTestName(test, sep='#'):
class InstrumentationTestInstance(test_instance.TestInstance):
- def __init__(self, args, isolate_delegate, error_func):
+ def __init__(self, args, data_deps_delegate, error_func):
super(InstrumentationTestInstance, self).__init__()
self._additional_apks = []
@@ -417,10 +416,9 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._initializeApkAttributes(args, error_func)
self._data_deps = None
- self._isolate_abs_path = None
- self._isolate_delegate = None
- self._isolated_abs_path = None
- self._initializeDataDependencyAttributes(args, isolate_delegate)
+ self._data_deps_delegate = None
+ self._runtime_deps_path = None
+ self._initializeDataDependencyAttributes(args, data_deps_delegate)
self._annotations = None
self._excluded_annotations = None
@@ -520,22 +518,12 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._additional_apks = (
[apk_helper.ToHelper(x) for x in args.additional_apks])
- def _initializeDataDependencyAttributes(self, args, isolate_delegate):
+ def _initializeDataDependencyAttributes(self, args, data_deps_delegate):
self._data_deps = []
- if (args.isolate_file_path and
- not isolator.IsIsolateEmpty(args.isolate_file_path)):
- if os.path.isabs(args.isolate_file_path):
- self._isolate_abs_path = args.isolate_file_path
- else:
- self._isolate_abs_path = os.path.join(
- constants.DIR_SOURCE_ROOT, args.isolate_file_path)
- self._isolate_delegate = isolate_delegate
- self._isolated_abs_path = os.path.join(
- constants.GetOutDirectory(), '%s.isolated' % self._test_package)
- else:
- self._isolate_delegate = None
+ self._data_deps_delegate = data_deps_delegate
+ self._runtime_deps_path = args.runtime_deps_path
- if not self._isolate_delegate:
+ if not self._runtime_deps_path:
logging.warning('No data dependencies will be pushed.')
def _initializeTestFilterAttributes(self, args):
@@ -688,11 +676,8 @@ class InstrumentationTestInstance(test_instance.TestInstance):
#override
def SetUp(self):
- if self._isolate_delegate:
- self._isolate_delegate.Remap(
- self._isolate_abs_path, self._isolated_abs_path)
- self._isolate_delegate.MoveOutputDeps()
- self._data_deps.extend([(self._isolate_delegate.isolate_deps_dir, None)])
+ self._data_deps.extend(
+ self._data_deps_delegate(self._runtime_deps_path))
def GetDataDependencies(self):
return self._data_deps
@@ -764,5 +749,4 @@ class InstrumentationTestInstance(test_instance.TestInstance):
#override
def TearDown(self):
- if self._isolate_delegate:
- self._isolate_delegate.Clear()
+ pass
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/pylib/local/device/local_device_gtest_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698