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 15 matching lines...) Expand all Loading... | |
26 | 26 |
27 | 27 |
28 _ISOLATE_FILE_PATHS = { | 28 _ISOLATE_FILE_PATHS = { |
29 'base_unittests': 'base/base_unittests.isolate', | 29 'base_unittests': 'base/base_unittests.isolate', |
30 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', | 30 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', |
31 'cc_perftests': 'cc/cc_perftests.isolate', | 31 'cc_perftests': 'cc/cc_perftests.isolate', |
32 'components_unittests': 'components/components_unittests.isolate', | 32 'components_unittests': 'components/components_unittests.isolate', |
33 'content_browsertests': 'content/content_browsertests.isolate', | 33 'content_browsertests': 'content/content_browsertests.isolate', |
34 'content_unittests': 'content/content_unittests.isolate', | 34 'content_unittests': 'content/content_unittests.isolate', |
35 'media_unittests': 'media/media_unittests.isolate', | 35 'media_unittests': 'media/media_unittests.isolate', |
36 'modules_unittests': 'third_party/webrtc/modules/modules_unittests.isolate', | |
37 'net_unittests': 'net/net_unittests.isolate', | 36 'net_unittests': 'net/net_unittests.isolate', |
38 'ui_unittests': 'ui/ui_unittests.isolate', | 37 'ui_unittests': 'ui/ui_unittests.isolate', |
39 'unit_tests': 'chrome/unit_tests.isolate', | 38 'unit_tests': 'chrome/unit_tests.isolate', |
40 'webkit_unit_tests': | 39 'webkit_unit_tests': |
41 'third_party/WebKit/Source/web/WebKitUnitTests.isolate', | 40 'third_party/WebKit/Source/web/WebKitUnitTests.isolate', |
42 } | 41 } |
43 | 42 |
43 # Paths relative to third_party/webrtc/ (kept separate for readability). | |
44 _WEBRTC_ISOLATE_FILE_PATHS = { | |
45 'audio_decoder_unittests': | |
46 'modules/audio_coding/neteq4/audio_decoder_unittests.isolate', | |
47 'common_audio_unittests': 'common_audio/common_audio_unittests.isolate', | |
48 'common_video_unittests': 'common_video/common_video_unittests.isolate', | |
49 'metrics_unittests': 'test/metrics_unittests.isolate', | |
50 'modules_tests': 'modules/modules_tests.isolate', | |
51 'modules_unittests': 'modules/modules_unittests.isolate', | |
52 'neteq_unittests': 'modules/audio_coding/neteq/neteq_unittests.isolate', | |
53 'system_wrappers_unittests': | |
54 'system_wrappers/source/system_wrappers_unittests.isolate', | |
55 'test_support_unittests': 'test/test_support_unittests.isolate', | |
56 'tools_unittests': 'tools/tools_unittests.isolate', | |
57 'video_engine_core_unittests': | |
58 'video_engine/video_engine_core_unittests.isolate', | |
59 'voice_engine_unittests': 'voice_engine/voice_engine_unittests.isolate', | |
60 } | |
61 | |
62 # Append the WebRTC tests with the full path from Chromium's src/ root. | |
63 for test,isolate_path in _WEBRTC_ISOLATE_FILE_PATHS.items(): | |
frankf
2013/08/27 18:34:54
space after comma
| |
64 _ISOLATE_FILE_PATHS[test] = 'third_party/webrtc/%s' % isolate_path | |
65 | |
44 # Used for filtering large data deps at a finer grain than what's allowed in | 66 # Used for filtering large data deps at a finer grain than what's allowed in |
45 # isolate files since pushing deps to devices is expensive. | 67 # isolate files since pushing deps to devices is expensive. |
46 # Wildcards are allowed. | 68 # Wildcards are allowed. |
47 _DEPS_EXCLUSION_LIST = [ | 69 _DEPS_EXCLUSION_LIST = [ |
48 'chrome/test/data/extensions/api_test', | 70 'chrome/test/data/extensions/api_test', |
49 'chrome/test/data/extensions/secure_shell', | 71 'chrome/test/data/extensions/secure_shell', |
50 'chrome/test/data/firefox*', | 72 'chrome/test/data/firefox*', |
51 'chrome/test/data/gpu', | 73 'chrome/test/data/gpu', |
52 'chrome/test/data/image_decoding', | 74 'chrome/test/data/image_decoding', |
53 'chrome/test/data/import', | 75 'chrome/test/data/import', |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 | 313 |
292 tests = _GetTestsFiltered(test_options.suite_name, test_options.gtest_filter, | 314 tests = _GetTestsFiltered(test_options.suite_name, test_options.gtest_filter, |
293 TestRunnerFactory, devices) | 315 TestRunnerFactory, devices) |
294 # Coalesce unit tests into a single test per device | 316 # Coalesce unit tests into a single test per device |
295 if test_options.suite_name != 'content_browsertests': | 317 if test_options.suite_name != 'content_browsertests': |
296 num_devices = len(devices) | 318 num_devices = len(devices) |
297 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 319 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
298 tests = [t for t in tests if t] | 320 tests = [t for t in tests if t] |
299 | 321 |
300 return (TestRunnerFactory, tests) | 322 return (TestRunnerFactory, tests) |
OLD | NEW |