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

Unified Diff: build/android/pylib/gtest/test_runner.py

Issue 21008004: Changes argument passing to use options objects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes imports, removes intermediate variables Created 7 years, 5 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 | « build/android/pylib/gtest/test_options.py ('k') | build/android/pylib/host_driven/python_test_base.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/test_runner.py
diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py
index 2a93e37532c828045c54011ebc0a77012985c964..b9b16168e7f1553363b9ad5fcf7a6b195060283a 100644
--- a/build/android/pylib/gtest/test_runner.py
+++ b/build/android/pylib/gtest/test_runner.py
@@ -23,30 +23,31 @@ def _TestSuiteRequiresMockTestServer(suite_name):
class TestRunner(base_test_runner.BaseTestRunner):
- def __init__(self, device, test_package, test_arguments, timeout,
- cleanup_test_files, tool_name, build_type, push_deps):
+ def __init__(self, test_options, device, test_package):
"""Single test suite attached to a single device.
Args:
+ test_options: A GTestOptions object.
device: Device to run the tests.
test_package: An instance of TestPackage class.
- test_arguments: Additional arguments to pass to the test binary.
- timeout: Timeout for each test.
- cleanup_test_files: Whether or not to cleanup test files on device.
- tool_name: Name of the Valgrind tool.
- build_type: 'Release' or 'Debug'.
- push_deps: If True, push all dependencies to the device.
"""
- super(TestRunner, self).__init__(device, tool_name, build_type, push_deps,
- cleanup_test_files)
+
+ super(TestRunner, self).__init__(device, test_options.tool,
+ test_options.build_type,
+ test_options.push_deps,
+ test_options.cleanup_test_files)
+
self.test_package = test_package
self.test_package.tool = self.tool
- self._test_arguments = test_arguments
+ self._test_arguments = test_options.test_arguments
+
+ timeout = test_options.timeout
if timeout == 0:
timeout = 60
# On a VM (e.g. chromium buildbots), this timeout is way too small.
if os.environ.get('BUILDBOT_SLAVENAME'):
timeout = timeout * 2
+
self._timeout = timeout * self.tool.GetTimeoutScale()
#override
« no previous file with comments | « build/android/pylib/gtest/test_options.py ('k') | build/android/pylib/host_driven/python_test_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698