OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 """Dispatches GTests.""" | 5 """Dispatches GTests.""" |
6 | 6 |
7 import copy | 7 import copy |
8 import fnmatch | 8 import fnmatch |
9 import glob | 9 import glob |
10 import logging | 10 import logging |
(...skipping 10 matching lines...) Expand all Loading... |
21 from pylib.utils import xvfb | 21 from pylib.utils import xvfb |
22 | 22 |
23 import gtest_config | 23 import gtest_config |
24 import test_runner | 24 import test_runner |
25 | 25 |
26 | 26 |
27 # TODO(frankf): Add more test targets here after making sure we don't | 27 # TODO(frankf): Add more test targets here after making sure we don't |
28 # blow up the dependency size (and the world). | 28 # blow up the dependency size (and the world). |
29 _ISOLATE_FILE_PATHS = { | 29 _ISOLATE_FILE_PATHS = { |
30 'base_unittests': 'base/base_unittests.isolate', | 30 'base_unittests': 'base/base_unittests.isolate', |
| 31 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', |
| 32 'cc_perftests': 'cc/cc_perftests.isolate', |
| 33 'components_unittests': 'components/components_unittests.isolate', |
| 34 'content_browsertests': 'content/content_browsertests.isolate', |
| 35 'content_unittests': 'content/content_unittests.isolate', |
| 36 'media_unittests': 'media/media_unittests.isolate', |
| 37 'net_unittests': 'net/net_unittests.isolate', |
| 38 'ui_unittests': 'ui/ui_unittests.isolate', |
31 'unit_tests': 'chrome/unit_tests.isolate', | 39 'unit_tests': 'chrome/unit_tests.isolate', |
32 } | 40 } |
33 | 41 |
34 # Used for filtering large data deps at a finer grain than what's allowed in | 42 # Used for filtering large data deps at a finer grain than what's allowed in |
35 # isolate files since pushing deps to devices is expensive. | 43 # isolate files since pushing deps to devices is expensive. |
36 # Wildcards are allowed. | 44 # Wildcards are allowed. |
37 _DEPS_EXCLUSION_LIST = [ | 45 _DEPS_EXCLUSION_LIST = [ |
38 'chrome/test/data/extensions/api_test', | 46 'chrome/test/data/extensions/api_test', |
39 'chrome/test/data/extensions/secure_shell', | 47 'chrome/test/data/extensions/secure_shell', |
40 'chrome/test/data/firefox*', | 48 'chrome/test/data/firefox*', |
41 'chrome/test/data/gpu', | 49 'chrome/test/data/gpu', |
42 'chrome/test/data/image_decoding', | 50 'chrome/test/data/image_decoding', |
43 'chrome/test/data/import', | 51 'chrome/test/data/import', |
44 'chrome/test/data/page_cycler', | 52 'chrome/test/data/page_cycler', |
45 'chrome/test/data/perf', | 53 'chrome/test/data/perf', |
46 'chrome/test/data/pyauto_private', | 54 'chrome/test/data/pyauto_private', |
47 'chrome/test/data/safari_import', | 55 'chrome/test/data/safari_import', |
48 'chrome/test/data/scroll', | 56 'chrome/test/data/scroll', |
49 'chrome/test/data/third_party', | 57 'chrome/test/data/third_party', |
50 'third_party/hunspell_dictionaries/*.dic', | 58 'third_party/hunspell_dictionaries/*.dic', |
| 59 # crbug.com/258690 |
| 60 'webkit/data/bmp_decoder', |
| 61 'webkit/data/ico_decoder', |
51 ] | 62 ] |
52 | 63 |
53 _ISOLATE_SCRIPT = os.path.join( | 64 _ISOLATE_SCRIPT = os.path.join( |
54 constants.DIR_SOURCE_ROOT, 'tools', 'swarm_client', 'isolate.py') | 65 constants.DIR_SOURCE_ROOT, 'tools', 'swarm_client', 'isolate.py') |
55 | 66 |
56 | 67 |
57 def _GenerateDepsDirUsingIsolate(test_suite, build_type): | 68 def _GenerateDepsDirUsingIsolate(test_suite, build_type): |
58 """Generate the dependency dir for the test suite using isolate. | 69 """Generate the dependency dir for the test suite using isolate. |
59 | 70 |
60 Args: | 71 Args: |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 failures = 0 | 348 failures = 0 |
338 for suite_name, suite_path in all_test_suites: | 349 for suite_name, suite_path in all_test_suites: |
339 # Give each test suite its own copy of options. | 350 # Give each test suite its own copy of options. |
340 test_options = copy.deepcopy(options) | 351 test_options = copy.deepcopy(options) |
341 test_options.test_suite = suite_path | 352 test_options.test_suite = suite_path |
342 failures += _RunATestSuite(test_options, suite_name) | 353 failures += _RunATestSuite(test_options, suite_name) |
343 | 354 |
344 if options.use_xvfb: | 355 if options.use_xvfb: |
345 framebuffer.Stop() | 356 framebuffer.Stop() |
346 return failures | 357 return failures |
OLD | NEW |