| Index: build/android/pylib/gtest/setup.py
|
| diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
|
| index a2468338a557d4d08ace3df42b1d90ff24d2a112..f6bf77865e6617366c486b1e0260241f8bc67b7c 100644
|
| --- a/build/android/pylib/gtest/setup.py
|
| +++ b/build/android/pylib/gtest/setup.py
|
| @@ -289,21 +289,12 @@ def GetTestsFiltered(suite_name, gtest_filter, runner_factory, devices):
|
| return tests
|
|
|
|
|
| -def Setup(use_exe_test_runner, suite_name, test_arguments, timeout,
|
| - cleanup_test_files, tool, build_type, push_deps,
|
| - gtest_filter):
|
| +def Setup(test_options):
|
| """Create the test runner factory and tests.
|
|
|
| Args:
|
| - use_exe_test_runner: If True, use the executable-based test runner.
|
| - suite_name: The suite name specified on the command line.
|
| - 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 of the Valgrind tool.
|
| - build_type: 'Release' or 'Debug'.
|
| - push_deps: If True, push all dependencies to the device.
|
| - gtest_filter: Filter for tests.
|
| + test_options: A GTestOptions object containing all options relevant to
|
| + running gtests.
|
|
|
| Returns:
|
| A tuple of (TestRunnerFactory, tests).
|
| @@ -312,30 +303,27 @@ def Setup(use_exe_test_runner, suite_name, test_arguments, timeout,
|
| if not ports.ResetTestServerPortAllocation():
|
| raise Exception('Failed to reset test server port.')
|
|
|
| - suite_path = _GetSuitePath(use_exe_test_runner, suite_name, build_type)
|
| + suite_path = _GetSuitePath(test_options.exe,
|
| + test_options.suite_name,
|
| + test_options.build_type)
|
|
|
| # TODO(gkanwar): This breaks the abstraction of having test_dispatcher.py deal
|
| # entirely with the devices. Can we do this another way?
|
| attached_devices = android_commands.GetAttachedDevices()
|
|
|
| - deps_dir = _GenerateDepsDirUsingIsolate(suite_name, build_type)
|
| # Constructs a new TestRunner with the current options.
|
| def TestRunnerFactory(device, shard_index):
|
| return test_runner.TestRunner(
|
| - device,
|
| + test_options,
|
| suite_path,
|
| - test_arguments,
|
| - timeout,
|
| - cleanup_test_files,
|
| - tool,
|
| - build_type,
|
| - push_deps,
|
| + device,
|
| constants.GTEST_TEST_PACKAGE_NAME,
|
| constants.GTEST_TEST_ACTIVITY_NAME,
|
| constants.GTEST_COMMAND_LINE_FILE)
|
|
|
| # Get tests and split them up based on the number of devices.
|
| - tests = GetTestsFiltered(suite_name, gtest_filter,
|
| + tests = GetTestsFiltered(test_options.suite_name,
|
| + test_options.gtest_filter,
|
| TestRunnerFactory, attached_devices)
|
| num_devices = len(attached_devices)
|
| tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)]
|
|
|