| Index: build/android/pylib/base/new_base_test_runner.py
|
| diff --git a/build/android/pylib/base/base_test_runner.py b/build/android/pylib/base/new_base_test_runner.py
|
| similarity index 93%
|
| copy from build/android/pylib/base/base_test_runner.py
|
| copy to build/android/pylib/base/new_base_test_runner.py
|
| index a4172ddf33eac3d27932d7a48eced92ef10122fb..4e7d3443f6d0f1ef8c9949dbd372c6143adcb559 100644
|
| --- a/build/android/pylib/base/base_test_runner.py
|
| +++ b/build/android/pylib/base/new_base_test_runner.py
|
| @@ -32,7 +32,7 @@ class BaseTestRunner(object):
|
| the Run() method will set up tests, run them and tear them down.
|
| """
|
|
|
| - def __init__(self, device, tool, shard_index, build_type):
|
| + def __init__(self, device, tool, build_type):
|
| """
|
| Args:
|
| device: Tests will run on the device of this ID.
|
| @@ -48,7 +48,6 @@ class BaseTestRunner(object):
|
| self.forwarder_base_url = ('http://localhost:%d' %
|
| self._forwarder_device_port)
|
| self.flags = FlagChanger(self.adb)
|
| - self.shard_index = shard_index
|
| self.flags.AddFlags(['--disable-fre'])
|
| self._spawning_server = None
|
| self._spawner_forwarder = None
|
| @@ -66,17 +65,18 @@ class BaseTestRunner(object):
|
| '%d:%d' % (self.test_server_spawner_port,
|
| self.test_server_port))
|
|
|
| - def Run(self):
|
| - """Calls subclass functions to set up tests, run them and tear them down.
|
| + def Run(self, test):
|
| + """Calls subclass functions to set up test, run it and tear it down.
|
| +
|
| + Args:
|
| + test: A Test to run.
|
|
|
| Returns:
|
| - Test results returned from RunTests().
|
| + Test results returned from RunTest(test).
|
| """
|
| - if not self.HasTests():
|
| - return True
|
| self.SetUp()
|
| try:
|
| - return self.RunTests()
|
| + return self.RunTest(test)
|
| finally:
|
| self.TearDown()
|
|
|
| @@ -84,12 +84,8 @@ class BaseTestRunner(object):
|
| """Called before tests run."""
|
| Forwarder.KillDevice(self.adb, self.tool)
|
|
|
| - def HasTests(self):
|
| - """Whether the test suite has tests to run."""
|
| - return True
|
| -
|
| - def RunTests(self):
|
| - """Runs the tests. Need to be overridden."""
|
| + def RunTest(self, test):
|
| + """Runs the tests. Needs to be overridden."""
|
| raise NotImplementedError
|
|
|
| def TearDown(self):
|
|
|