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

Unified Diff: build/android/pylib/python_test_base.py

Issue 10917283: Upstream changes to python tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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/python_test_caller.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | build/android/pylib/python_test_caller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698