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

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

Issue 1128043007: Support Kerberos on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deal with comments and build and test failures. Created 5 years, 6 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
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 a48f18a70f669cc27aae4d62f9f577c7081807ae..57bd30111a6437c2f67fa0b11adaef13420b6d8a 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -32,6 +32,12 @@ RE_CRASH = re.compile('\\[ CRASHED \\](.*)\r\n')
# hard cap.
_INFRA_STDOUT_TIMEOUT = 20 * 60
+def _TestSuiteRunsInSubThread(suite_name):
+ """Returns True if the test suite needs to run in a sub-thread"""
+ # net_unittests create an Android service that needs to receive Java main
+ # thread events while the tests are running, so run the tests in a sub-thread.
+ tests_run_in_sub_thread = ['net_unittests']
+ return (suite_name in tests_run_in_sub_thread)
def _TestSuiteRequiresMockTestServer(suite_name):
"""Returns True if the test suite requires mock test server."""
@@ -178,7 +184,9 @@ class TestRunner(base_test_runner.BaseTestRunner):
self.test_package.CreateCommandLineFileOnDevice(
self.device, test, self._test_arguments)
test_results = self._ParseTestOutput(
- self.test_package.SpawnTestProcess(self.device))
+ self.test_package.SpawnTestProcess(
+ self.device,
+ _TestSuiteRunsInSubThread(self.test_package.suite_name)))
if self._app_data_files:
self.test_package.PullAppFiles(self.device, self._app_data_files,
self._app_data_file_dir)

Powered by Google App Engine
This is Rietveld 408576698