| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Generates test runner factory and tests for GTests.""" | 5 """Generates test runner factory and tests for GTests.""" |
| 6 | 6 |
| 7 import fnmatch | 7 import fnmatch |
| 8 import glob | 8 import glob |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 'chrome/test/data/safari_import', | 59 'chrome/test/data/safari_import', |
| 60 'chrome/test/data/scroll', | 60 'chrome/test/data/scroll', |
| 61 'chrome/test/data/third_party', | 61 'chrome/test/data/third_party', |
| 62 'third_party/hunspell_dictionaries/*.dic', | 62 'third_party/hunspell_dictionaries/*.dic', |
| 63 # crbug.com/258690 | 63 # crbug.com/258690 |
| 64 'webkit/data/bmp_decoder', | 64 'webkit/data/bmp_decoder', |
| 65 'webkit/data/ico_decoder', | 65 'webkit/data/ico_decoder', |
| 66 ] | 66 ] |
| 67 | 67 |
| 68 _ISOLATE_SCRIPT = os.path.join( | 68 _ISOLATE_SCRIPT = os.path.join( |
| 69 constants.DIR_SOURCE_ROOT, 'tools', 'swarming_client', 'isolate.py') | 69 constants.DIR_SOURCE_ROOT, 'tools', 'swarm_client', 'isolate.py') |
| 70 | 70 |
| 71 | 71 |
| 72 def _GenerateDepsDirUsingIsolate(suite_name, build_type): | 72 def _GenerateDepsDirUsingIsolate(suite_name, build_type): |
| 73 """Generate the dependency dir for the test suite using isolate. | 73 """Generate the dependency dir for the test suite using isolate. |
| 74 | 74 |
| 75 Args: | 75 Args: |
| 76 suite_name: Name of the test suite (e.g. base_unittests). | 76 suite_name: Name of the test suite (e.g. base_unittests). |
| 77 build_type: Release/Debug | 77 build_type: Release/Debug |
| 78 """ | 78 """ |
| 79 product_dir = os.path.join(cmd_helper.OutDirectory.get(), build_type) | 79 product_dir = os.path.join(cmd_helper.OutDirectory.get(), build_type) |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 attached_devices = android_commands.GetAttachedDevices() | 294 attached_devices = android_commands.GetAttachedDevices() |
| 295 tests = _GetTestsFiltered(test_options.suite_name, test_options.gtest_filter, | 295 tests = _GetTestsFiltered(test_options.suite_name, test_options.gtest_filter, |
| 296 TestRunnerFactory, attached_devices) | 296 TestRunnerFactory, attached_devices) |
| 297 # Coalesce unit tests into a single test per device | 297 # Coalesce unit tests into a single test per device |
| 298 if test_options.suite_name != 'content_browsertests': | 298 if test_options.suite_name != 'content_browsertests': |
| 299 num_devices = len(attached_devices) | 299 num_devices = len(attached_devices) |
| 300 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 300 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
| 301 tests = [t for t in tests if t] | 301 tests = [t for t in tests if t] |
| 302 | 302 |
| 303 return (TestRunnerFactory, tests) | 303 return (TestRunnerFactory, tests) |
| OLD | NEW |