| 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 DEPS = [ | 5 DEPS = [ |
| 6 'bot_update', | 6 'bot_update', |
| 7 'chromium', | 7 'chromium', |
| 8 'chromium_tests', | 8 'chromium_tests', |
| 9 'gclient', | 9 'gclient', |
| 10 'isolate', | 10 'isolate', |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 compile_targets, gtest_tests = parse_test_spec( | 787 compile_targets, gtest_tests = parse_test_spec( |
| 788 test_spec, | 788 test_spec, |
| 789 bot_config.get('enable_swarming'), | 789 bot_config.get('enable_swarming'), |
| 790 should_use_test) | 790 should_use_test) |
| 791 compile_targets.extend(bot_config.get('compile_targets', [])) | 791 compile_targets.extend(bot_config.get('compile_targets', [])) |
| 792 # TODO(phajdan.jr): Also compile 'all' on win, http://crbug.com/368831 . | 792 # TODO(phajdan.jr): Also compile 'all' on win, http://crbug.com/368831 . |
| 793 # Disabled for now because it takes too long and/or fails on Windows. | 793 # Disabled for now because it takes too long and/or fails on Windows. |
| 794 if not api.platform.is_win and not bot_config.get('exclude_compile_all'): | 794 if not api.platform.is_win and not bot_config.get('exclude_compile_all'): |
| 795 compile_targets = ['all'] + compile_targets | 795 compile_targets = ['all'] + compile_targets |
| 796 | 796 |
| 797 scripts_compile_targets = \ |
| 798 api.chromium.get_compile_targets_for_scripts().json.output |
| 799 |
| 797 # Tests that are only run if their compile_targets are going to be built. | 800 # Tests that are only run if their compile_targets are going to be built. |
| 798 conditional_tests = [api.chromium.steps.NaclIntegrationTest()] | 801 conditional_tests = [api.chromium.steps.NaclIntegrationTest()] |
| 799 if bot_config.get('add_telemetry_tests', True): | 802 if bot_config.get('add_telemetry_tests', True): |
| 800 conditional_tests += [api.chromium.steps.TelemetryUnitTests(), | 803 conditional_tests += [ |
| 801 api.chromium.steps.TelemetryPerfUnitTests()] | 804 api.chromium.steps.ScriptTest( |
| 805 'telemetry_unittests', 'telemetry_unittests.py', |
| 806 scripts_compile_targets), |
| 807 api.chromium.steps.TelemetryPerfUnitTests() |
| 808 ] |
| 802 | 809 |
| 803 # See if the patch needs to compile on the current platform. | 810 # See if the patch needs to compile on the current platform. |
| 804 # Don't run analyze for other projects, such as blink, as there aren't that | 811 # Don't run analyze for other projects, such as blink, as there aren't that |
| 805 # many try jobs for them. | 812 # many try jobs for them. |
| 806 requires_compile = True | 813 requires_compile = True |
| 807 if isinstance(test_spec, dict) and api.properties.get('root') == 'src': | 814 if isinstance(test_spec, dict) and api.properties.get('root') == 'src': |
| 808 analyze_config_file = bot_config['testing'].get('analyze_config_file', | 815 analyze_config_file = bot_config['testing'].get('analyze_config_file', |
| 809 'trybot_analyze_config.json') | 816 'trybot_analyze_config.json') |
| 810 requires_compile, matching_exes, compile_targets = \ | 817 requires_compile, matching_exes, compile_targets = \ |
| 811 api.chromium_tests.analyze( | 818 api.chromium_tests.analyze( |
| 812 get_test_names(gtest_tests) + | 819 get_test_names(gtest_tests) + |
| 813 all_compile_targets(api, conditional_tests), | 820 all_compile_targets(api, conditional_tests), |
| 814 compile_targets, | 821 compile_targets, |
| 815 analyze_config_file) | 822 analyze_config_file) |
| 816 | 823 |
| 817 gtest_tests = filter_tests(gtest_tests, matching_exes) | 824 gtest_tests = filter_tests(gtest_tests, matching_exes) |
| 818 | 825 |
| 819 tests = [] | 826 tests = [] |
| 820 # TODO(phajdan.jr): Re-enable checkdeps on Windows when it works with git. | 827 # TODO(phajdan.jr): Re-enable checkdeps on Windows when it works with git. |
| 821 if not api.platform.is_win: | 828 if not api.platform.is_win: |
| 822 tests.append(api.chromium.steps.ScriptTest('checkdeps', 'checkdeps.py')) | 829 tests.append(api.chromium.steps.ScriptTest( |
| 830 'checkdeps', 'checkdeps.py', scripts_compile_targets)) |
| 823 if api.platform.is_linux: | 831 if api.platform.is_linux: |
| 824 tests.extend([ | 832 tests.extend([ |
| 825 api.chromium.steps.CheckpermsTest(), | 833 api.chromium.steps.CheckpermsTest(), |
| 826 api.chromium.steps.ChecklicensesTest(), | 834 api.chromium.steps.ChecklicensesTest(), |
| 827 ]) | 835 ]) |
| 828 | 836 |
| 829 conditional_tests = tests_in_compile_targets( | 837 conditional_tests = tests_in_compile_targets( |
| 830 api, compile_targets, conditional_tests) | 838 api, compile_targets, conditional_tests) |
| 831 tests.extend(find_test_named(api.chromium.steps.TelemetryUnitTests.name, | 839 tests.extend(find_test_named('telemetry_unittests', conditional_tests)) |
| 832 conditional_tests)) | |
| 833 tests.extend(find_test_named(api.chromium.steps.TelemetryPerfUnitTests.name, | 840 tests.extend(find_test_named(api.chromium.steps.TelemetryPerfUnitTests.name, |
| 834 conditional_tests)) | 841 conditional_tests)) |
| 835 tests.extend(gtest_tests) | 842 tests.extend(gtest_tests) |
| 836 tests.extend(find_test_named(api.chromium.steps.NaclIntegrationTest.name, | 843 tests.extend(find_test_named(api.chromium.steps.NaclIntegrationTest.name, |
| 837 conditional_tests)) | 844 conditional_tests)) |
| 838 | 845 |
| 839 if api.platform.is_win: | 846 if api.platform.is_win: |
| 840 tests.append(api.chromium.steps.MiniInstallerTest()) | 847 tests.append(api.chromium.steps.MiniInstallerTest()) |
| 841 | 848 |
| 842 if not requires_compile: | 849 if not requires_compile: |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1559 }, | 1566 }, |
| 1560 ], | 1567 ], |
| 1561 }) | 1568 }) |
| 1562 ) + | 1569 ) + |
| 1563 api.override_step_data( | 1570 api.override_step_data( |
| 1564 'analyze', | 1571 'analyze', |
| 1565 api.json.output({'status': 'Found dependency', | 1572 api.json.output({'status': 'Found dependency', |
| 1566 'targets': ['browser_tests', 'base_unittests'], | 1573 'targets': ['browser_tests', 'base_unittests'], |
| 1567 'build_targets': ['base_unittests']})) | 1574 'build_targets': ['base_unittests']})) |
| 1568 ) | 1575 ) |
| OLD | NEW |