| 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..d9c7bdfb4e89c8bc522198c27f82e642fd9f4fbb 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
|
| @@ -21,6 +23,8 @@ from pylib.utils import dexdump
|
| from pylib.utils import proguard
|
| from pylib.utils import shared_preference_utils
|
|
|
| +import tombstones_helper
|
| +
|
| 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._tombstones_helper = tombstones_helper.TombstonesHelper()
|
| 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()
|
| + self._tombstones_helper = tombstones_helper.TombstonesHelper(
|
| + 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 tombstones_helper(self):
|
| + return self._tombstones_helper
|
| +
|
| @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)
|
|
|