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

Unified Diff: build/android/pylib/gtest/test_runner.py

Issue 1222313015: Manual partial update from from https://crrev.com/337502 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months 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
« no previous file with comments | « build/android/pylib/gtest/test_package_exe.py ('k') | build/android/pylib/instrumentation/test_jar.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d01990c2ee2ada4f9f8a3a6f5ab794fc0245bae..a48f18a70f669cc27aae4d62f9f577c7081807ae 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -5,6 +5,7 @@
import logging
import os
import re
+import tempfile
from pylib import pexpect
from pylib import ports
@@ -80,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)
@@ -167,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()
« no previous file with comments | « build/android/pylib/gtest/test_package_exe.py ('k') | build/android/pylib/instrumentation/test_jar.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698