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 2443384e51864c28c3a3c22d2b19f34704ae8aca..8715f80ea5ca2a5d062432904b992e716cdd51e8 100644 |
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py |
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py |
@@ -7,6 +7,8 @@ import logging |
import os |
import pickle |
import re |
+import shutil |
+import tempfile |
from devil.android import apk_helper |
from devil.android import md5sum |
@@ -20,6 +22,8 @@ from pylib.instrumentation import instrumentation_parser |
from pylib.utils import dexdump |
from pylib.utils import proguard |
from pylib.utils import shared_preference_utils |
+from pylib.utils import symbolizer |
+ |
with host_paths.SysPath(host_paths.BUILD_COMMON_PATH): |
import unittest_util # pylint: disable=import-error |
@@ -443,6 +447,8 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
self._initializeTestCoverageAttributes(args) |
self._store_tombstones = False |
+ self._unzipped_files_dir = None |
+ self._symbolizer = symbolizer.Symbolizer() |
self._initializeTombstonesAttributes(args) |
self._gs_results_bucket = None |
@@ -624,6 +630,11 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
def _initializeTombstonesAttributes(self, args): |
self._store_tombstones = args.store_tombstones |
+ self._unzipped_files_dir = tempfile.mkdtemp() |
jbudorick
2017/07/20 15:58:03
Hmm. Why should the test instance (or the client g
BigBossZhiling
2017/07/20 23:11:37
Done.
|
+ self._symbolizer = symbolizer.Symbolizer( |
+ self.apk_under_test.path if self.apk_under_test else None, |
+ args.enable_relocation_packing, |
+ self._unzipped_files_dir) |
def _initializeLogAttributes(self, args): |
self._gs_results_bucket = args.gs_results_bucket |
@@ -716,6 +727,10 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
def suite(self): |
return self._suite |
+ @property |
+ def symbolizer(self): |
+ return self._symbolizer |
+ |
@property |
def test_apk(self): |
return self._test_apk |
@@ -846,4 +861,5 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
#override |
def TearDown(self): |
- pass |
+ if self._unzipped_files_dir: |
+ shutil.rmtree(self._unzipped_files_dir) |