Index: build/android/pylib/host_driven/python_test_base.py |
diff --git a/build/android/pylib/host_driven/python_test_base.py b/build/android/pylib/host_driven/python_test_base.py |
index c2d0f69513d5a8c736c357116ad6005631eb6506..6d9f53107fec27c0a991a36934a8e8f2c880adaa 100644 |
--- a/build/android/pylib/host_driven/python_test_base.py |
+++ b/build/android/pylib/host_driven/python_test_base.py |
@@ -78,9 +78,13 @@ class PythonTestBase(object): |
apks = [apk_info.ApkInfo(self.options.test_apk_path, |
self.options.test_apk_jar_path)] |
java_test_runner = test_runner.TestRunner(self.options, self.device_id, |
- [test], False, self.shard_index, |
- apks, self.ports_to_forward) |
- return java_test_runner.Run() |
+ self.shard_index, False, apks, |
+ self.ports_to_forward) |
+ try: |
+ java_test_runner.SetUp() |
+ return java_test_runner.RunTest(test)[0] |
+ finally: |
+ java_test_runner.TearDown() |
def _RunJavaTests(self, fname, tests): |
"""Calls a list of tests and stops at the first test failure. |