| Index: build/android/pylib/gtest/test_runner.py
|
| diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py
|
| index 49263888c34aeb7f4b2816dedda6f3b32688d6fa..a48f18a70f669cc27aae4d62f9f577c7081807ae 100644
|
| --- a/build/android/pylib/gtest/test_runner.py
|
| +++ b/build/android/pylib/gtest/test_runner.py
|
| @@ -5,12 +5,14 @@
|
| import logging
|
| import os
|
| import re
|
| +import tempfile
|
|
|
| from pylib import pexpect
|
| from pylib import ports
|
| from pylib.base import base_test_result
|
| from pylib.base import base_test_runner
|
| from pylib.device import device_errors
|
| +from pylib.gtest import gtest_test_instance
|
| from pylib.local import local_test_server_spawner
|
| from pylib.perf import perf_control
|
|
|
| @@ -79,6 +81,17 @@ class TestRunner(base_test_runner.BaseTestRunner):
|
| else:
|
| self._servers = []
|
|
|
| + if test_options.app_data_files:
|
| + self._app_data_files = test_options.app_data_files
|
| + if test_options.app_data_file_dir:
|
| + self._app_data_file_dir = test_options.app_data_file_dir
|
| + else:
|
| + self._app_data_file_dir = tempfile.mkdtemp()
|
| + logging.critical('Saving app files to %s', self._app_data_file_dir)
|
| + else:
|
| + self._app_data_files = None
|
| + self._app_data_file_dir = None
|
| +
|
| #override
|
| def InstallTestPackage(self):
|
| self.test_package.Install(self.device)
|
| @@ -166,6 +179,9 @@ class TestRunner(base_test_runner.BaseTestRunner):
|
| self.device, test, self._test_arguments)
|
| test_results = self._ParseTestOutput(
|
| self.test_package.SpawnTestProcess(self.device))
|
| + if self._app_data_files:
|
| + self.test_package.PullAppFiles(self.device, self._app_data_files,
|
| + self._app_data_file_dir)
|
| finally:
|
| for s in self._servers:
|
| s.Reset()
|
|
|