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

Unified Diff: build/android/pylib/base/new_base_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 | « no previous file | build/android/pylib/base/shard.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/new_base_test_runner.py
diff --git a/build/android/pylib/base/new_base_test_runner.py b/build/android/pylib/base/new_base_test_runner.py
index 4e7d3443f6d0f1ef8c9949dbd372c6143adcb559..67a7bda577863b0d8f3c9c5330490abfd870660d 100644
--- a/build/android/pylib/base/new_base_test_runner.py
+++ b/build/android/pylib/base/new_base_test_runner.py
@@ -65,31 +65,23 @@ class BaseTestRunner(object):
'%d:%d' % (self.test_server_spawner_port,
self.test_server_port))
- def Run(self, test):
- """Calls subclass functions to set up test, run it and tear it down.
+ def RunTest(self, test):
+ """Runs a test. Needs to be overridden.
Args:
- test: A Test to run.
+ test: A test to run.
Returns:
- Test results returned from RunTest(test).
+ Tuple containing: (test_result.TestResults, tests to rerun or None)
"""
- self.SetUp()
- try:
- return self.RunTest(test)
- finally:
- self.TearDown()
+ raise NotImplementedError
def SetUp(self):
- """Called before tests run."""
+ """Run once before all tests are run."""
Forwarder.KillDevice(self.adb, self.tool)
- def RunTest(self, test):
- """Runs the tests. Needs to be overridden."""
- raise NotImplementedError
-
def TearDown(self):
- """Called when tests finish running."""
+ """Run once after all tests are run."""
self.ShutdownHelperToolsForTestSuite()
def CopyTestData(self, test_data_paths, dest_dir):
« no previous file with comments | « no previous file | build/android/pylib/base/shard.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698