def RunnerFactory(device, shard_index): return test_runner.TestRunner(device, options.test_suite, options.test_arguments, options.timeout, options.cleanup_test_files, options.tool, options.build_type, options.webkit, constants.BROWSERTEST_TEST_PACKAGE_NAME, constants.BROWSERTEST_TEST_ACTIVITY_NAME, constants.BROWSERTEST_COMMAND_LINE_FILE)
def CreateShardedTestRunner(self, device, index): """Creates a suite-specific test runner. Args: device: Device serial where this shard will run. index: Index of this device in the pool. Returns: A TestRunner object. """ device_num = len(self.attached_devices) shard_test_list = self.tests[index::device_num] test_filter = ':'.join(shard_test_list) + self.gtest_filter return test_runner.TestRunner(device, self.test_suite, test_filter, self.test_arguments, self.timeout, self.cleanup_test_files, self.tool, index, self.build_type, self.in_webkit_checkout)
def _GetTestsFromDevice(self, device): logging.info('Obtaining tests from %s', device) runner = test_runner.TestRunner(device, self.test_suite, self.gtest_filter, self.test_arguments, self.timeout, self.cleanup_test_files, self.tool, 0, self.build_type, self.in_webkit_checkout) # The executable/apk needs to be copied before we can call GetAllTests. runner.test_package.StripAndCopyExecutable() all_tests = runner.test_package.GetAllTests() disabled_list = runner.GetDisabledTests() # Only includes tests that do not have any match in the disabled list. all_tests = filter( lambda t: not any([ fnmatch.fnmatch(t, disabled_pattern) for disabled_pattern in disabled_list ]), all_tests) return all_tests
def TestRunnerFactory(device, _shard_index): return test_runner.TestRunner(test_options, device, test_package)