| 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 # pylint: disable=W0212 | 6 # pylint: disable=W0212 |
| 7 | 7 |
| 8 import fnmatch | 8 import fnmatch |
| 9 import glob | 9 import glob |
| 10 import logging | 10 import logging |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 sys.path.insert(0, | 24 sys.path.insert(0, |
| 25 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', | 25 os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib', |
| 26 'common')) | 26 'common')) |
| 27 import unittest_util # pylint: disable=F0401 | 27 import unittest_util # pylint: disable=F0401 |
| 28 | 28 |
| 29 | 29 |
| 30 _ISOLATE_FILE_PATHS = { | 30 _ISOLATE_FILE_PATHS = { |
| 31 'base_unittests': 'base/base_unittests.isolate', | 31 'base_unittests': 'base/base_unittests.isolate', |
| 32 'blink_heap_unittests': | 32 'blink_heap_unittests': |
| 33 'third_party/WebKit/Source/heap/BlinkHeapUnitTests.isolate', | 33 'third_party/WebKit/Source/platform/heap/BlinkHeapUnitTests.isolate', |
| 34 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', | 34 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', |
| 35 'cc_perftests': 'cc/cc_perftests.isolate', | 35 'cc_perftests': 'cc/cc_perftests.isolate', |
| 36 'components_unittests': 'components/components_unittests.isolate', | 36 'components_unittests': 'components/components_unittests.isolate', |
| 37 'content_browsertests': 'content/content_browsertests.isolate', | 37 'content_browsertests': 'content/content_browsertests.isolate', |
| 38 'content_unittests': 'content/content_unittests.isolate', | 38 'content_unittests': 'content/content_unittests.isolate', |
| 39 'media_perftests': 'media/media_perftests.isolate', | 39 'media_perftests': 'media/media_perftests.isolate', |
| 40 'media_unittests': 'media/media_unittests.isolate', | 40 'media_unittests': 'media/media_unittests.isolate', |
| 41 'net_unittests': 'net/net_unittests.isolate', | 41 'net_unittests': 'net/net_unittests.isolate', |
| 42 'ui_unittests': 'ui/ui_unittests.isolate', | 42 'ui_unittests': 'ui/ui_unittests.isolate', |
| 43 'unit_tests': 'chrome/unit_tests.isolate', | 43 'unit_tests': 'chrome/unit_tests.isolate', |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 if test_options.gtest_filter: | 328 if test_options.gtest_filter: |
| 329 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 329 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
| 330 | 330 |
| 331 # Coalesce unit tests into a single test per device | 331 # Coalesce unit tests into a single test per device |
| 332 if test_options.suite_name != 'content_browsertests': | 332 if test_options.suite_name != 'content_browsertests': |
| 333 num_devices = len(devices) | 333 num_devices = len(devices) |
| 334 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 334 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
| 335 tests = [t for t in tests if t] | 335 tests = [t for t in tests if t] |
| 336 | 336 |
| 337 return (TestRunnerFactory, tests) | 337 return (TestRunnerFactory, tests) |
| OLD | NEW |