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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 'chrome/test/data/safari_import', | 80 'chrome/test/data/safari_import', |
81 'chrome/test/data/scroll', | 81 'chrome/test/data/scroll', |
82 'chrome/test/data/third_party', | 82 'chrome/test/data/third_party', |
83 'third_party/hunspell_dictionaries/*.dic', | 83 'third_party/hunspell_dictionaries/*.dic', |
84 # crbug.com/258690 | 84 # crbug.com/258690 |
85 'webkit/data/bmp_decoder', | 85 'webkit/data/bmp_decoder', |
86 'webkit/data/ico_decoder', | 86 'webkit/data/ico_decoder', |
87 ] | 87 ] |
88 | 88 |
89 _ISOLATE_SCRIPT = os.path.join( | 89 _ISOLATE_SCRIPT = os.path.join( |
90 constants.DIR_SOURCE_ROOT, 'tools', 'swarm_client', 'isolate.py') | 90 constants.DIR_SOURCE_ROOT, 'tools', 'swarming_client', 'isolate.py') |
91 | 91 |
92 | 92 |
93 def _GenerateDepsDirUsingIsolate(suite_name): | 93 def _GenerateDepsDirUsingIsolate(suite_name): |
94 """Generate the dependency dir for the test suite using isolate. | 94 """Generate the dependency dir for the test suite using isolate. |
95 | 95 |
96 Args: | 96 Args: |
97 suite_name: Name of the test suite (e.g. base_unittests). | 97 suite_name: Name of the test suite (e.g. base_unittests). |
98 """ | 98 """ |
99 if os.path.isdir(constants.ISOLATE_DEPS_DIR): | 99 if os.path.isdir(constants.ISOLATE_DEPS_DIR): |
100 shutil.rmtree(constants.ISOLATE_DEPS_DIR) | 100 shutil.rmtree(constants.ISOLATE_DEPS_DIR) |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 if test_options.gtest_filter: | 311 if test_options.gtest_filter: |
312 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 312 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
313 | 313 |
314 # Coalesce unit tests into a single test per device | 314 # Coalesce unit tests into a single test per device |
315 if test_options.suite_name != 'content_browsertests': | 315 if test_options.suite_name != 'content_browsertests': |
316 num_devices = len(devices) | 316 num_devices = len(devices) |
317 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 317 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
318 tests = [t for t in tests if t] | 318 tests = [t for t in tests if t] |
319 | 319 |
320 return (TestRunnerFactory, tests) | 320 return (TestRunnerFactory, tests) |
OLD | NEW |