Index: build/android/pylib/python_test_base.py |
diff --git a/build/android/pylib/python_test_base.py b/build/android/pylib/python_test_base.py |
index 39b9d278be11d94d5b1af2bdf7b9731d8d516356..3517cdda838c804ccde807204b4ed5c724b60b77 100644 |
--- a/build/android/pylib/python_test_base.py |
+++ b/build/android/pylib/python_test_base.py |
@@ -26,7 +26,6 @@ import time |
import android_commands |
import apk_info |
from run_java_tests import TestRunner |
-import test_options_parser |
from test_result import SingleTestResult, TestResults |
@@ -45,12 +44,13 @@ class PythonTestBase(object): |
self.test_name = test_name |
class_name = self.__class__.__name__ |
self.qualified_name = class_name + '.' + self.test_name |
- self.ports_to_forward = [] |
- def SetUp(self, device_id, shard_index): |
- self.shard_index = shard_index |
- self.device_id = device_id |
+ def SetUp(self, options): |
+ self.options = options |
+ self.shard_index = self.options.shard_index |
+ self.device_id = self.options.device_id |
self.adb = android_commands.AndroidCommands(self.device_id) |
+ self.ports_to_forward = [] |
def TearDown(self): |
pass |
@@ -71,10 +71,9 @@ class PythonTestBase(object): |
TestResults object with a single test result. |
""" |
test = self._ComposeFullTestName(fname, suite, test) |
- # Get a set of default options |
- options = test_options_parser.ParseInstrumentationArgs(['']) |
- apks = [apk_info.ApkInfo(options.test_apk_path, options.test_apk_jar_path)] |
- java_test_runner = TestRunner(options, self.device_id, [test], False, |
+ apks = [apk_info.ApkInfo(self.options.test_apk_path, |
+ self.options.test_apk_jar_path)] |
+ java_test_runner = TestRunner(self.options, self.device_id, [test], False, |
self.shard_index, |
apks, |
self.ports_to_forward) |