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

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

Issue 12317059: [Andoid] Threaded TestRunner creation and SetUp and TearDown calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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_executable.py ('k') | build/android/pylib/utils/reraiser_thread.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 0ecc9c5a787cb39ded4e5a47234bfe524329793b..c86e4fe28d8529d95ec48a27210dd29f7f3f2729 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -240,6 +240,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
gtest_filter_base_path + '_emulator_additional_disabled'))
return disabled_tests
+ #override
def RunTest(self, test):
"""Runs a test on a single device.
@@ -254,6 +255,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
return test_results, None
try:
+ self.test_package.ClearApplicationState()
self.test_package.CreateTestRunnerScript(test, self._test_arguments)
test_results = self.test_package.RunTestsAndListResults()
except errors.DeviceUnresponsiveError as e:
@@ -261,7 +263,6 @@ class TestRunner(base_test_runner.BaseTestRunner):
logging.warning(e)
if android_commands.IsDeviceAttached(self.device):
raise
- test_results.device_exception = device_exception
# Calculate unknown test results.
# TODO(frankf): Do not break TestResults encapsulation.
all_tests = set(test.split(':'))
@@ -272,15 +273,16 @@ class TestRunner(base_test_runner.BaseTestRunner):
retry = ':'.join([t.name for t in test_results.GetAllBroken()])
return test_results, retry
+ #override
def SetUp(self):
"""Sets up necessary test enviroment for the test suite."""
super(TestRunner, self).SetUp()
- self.adb.ClearApplicationState(constants.CHROME_PACKAGE)
self.StripAndCopyFiles()
if _TestSuiteRequiresMockTestServer(self.test_package.test_suite_basename):
self.LaunchChromeTestServerSpawner()
self.tool.SetupEnvironment()
+ #override
def TearDown(self):
"""Cleans up the test enviroment for the test suite."""
self.tool.CleanUpEnvironment()
« no previous file with comments | « build/android/pylib/gtest/test_package_executable.py ('k') | build/android/pylib/utils/reraiser_thread.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698