Chromium Code Reviews| 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 import collections | 5 import collections |
| 6 | 6 |
| 7 from recipe_engine.types import freeze | 7 from recipe_engine.types import freeze |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'amp', | 10 'amp', |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 730 bot_config['mastername'], | 730 bot_config['mastername'], |
| 731 bot_config['buildername'], | 731 bot_config['buildername'], |
| 732 master_dict, | 732 master_dict, |
| 733 test_spec, | 733 test_spec, |
| 734 override_bot_type='builder_tester', | 734 override_bot_type='builder_tester', |
| 735 override_tests=tests) | 735 override_tests=tests) |
| 736 | 736 |
| 737 targets_for_analyze = sorted(set( | 737 targets_for_analyze = sorted(set( |
| 738 all_compile_targets(api, tests + tests_including_triggered) + | 738 all_compile_targets(api, tests + tests_including_triggered) + |
| 739 compile_targets)) | 739 compile_targets)) |
| 740 requires_compile, matching_exes, compile_targets = \ | 740 requires_compile, matching_exes, _ = \ |
| 741 api.chromium_tests.analyze( | 741 api.chromium_tests.analyze( |
|
Dirk Pranke
2015/10/20 20:10:06
why not change the signature of analyze() to not t
sky
2015/10/21 16:16:13
Especially since the return values of the two are
| |
| 742 affected_files, | 742 affected_files, |
| 743 targets_for_analyze, | 743 targets_for_analyze, |
| 744 compile_targets, | 744 targets_for_analyze, |
| 745 'trybot_analyze_config.json') | 745 'trybot_analyze_config.json') |
| 746 if bot_config.get('analyze_mode') == 'compile': | 746 if bot_config.get('analyze_mode') == 'compile': |
| 747 # Do not pass tests to compile_specific_targets below. It assumes | 747 # Do not pass tests to compile_specific_targets below. It assumes |
| 748 # all of these targets would be compiled (matching_exes), but that's | 748 # all of these targets would be compiled (matching_exes), but that's |
| 749 # explicitly what we're not doing here. One example of how this may | 749 # explicitly what we're not doing here. One example of how this may |
| 750 # break is only foo_unittests being in returned compile_targets, | 750 # break is only foo_unittests being in returned compile_targets, |
| 751 # while matching_exes containing both foo_unittests and foo_unittests_run. | 751 # while matching_exes containing both foo_unittests and foo_unittests_run. |
| 752 # Then if we proceed with tests passed to compile_specific_targets, | 752 # Then if we proceed with tests passed to compile_specific_targets, |
| 753 # trying to isolate affected targets may fail. | 753 # trying to isolate affected targets may fail. |
| 754 tests = [] | 754 tests = [] |
| 755 tests_including_triggered = [] | 755 tests_including_triggered = [] |
| 756 | 756 |
| 757 # TODO(sergiyb): This is a hotfix that should be removed if we implement a | 757 compile_targets = sorted(set(matching_exes)) |
| 758 # proper long-term fix. It is currently needed to ensure that we compile | |
| 759 # matching_exes also when a bot is running analyze in compile-only mode and | |
| 760 # stay consistent with corresponding waterfall bots. Please see | |
| 761 # http://crbug.com/529798 for more context. | |
| 762 compile_targets = sorted(set(compile_targets + matching_exes)) | |
| 763 else: | |
| 764 # Note that compile_targets doesn't necessarily include matching_exes, | |
| 765 # and for correctness we need to add them. Otherwise it's possible we'd | |
| 766 # only build say foo_unittests but not foo_unittests_run and fail when | |
| 767 # trying to isolate the tests. Also see above comment. | |
| 768 compile_targets = sorted(set(compile_targets + matching_exes)) | |
| 769 | 758 |
| 770 # Blink tests have to bypass "analyze", see below. | 759 # Blink tests have to bypass "analyze", see below. |
| 771 if requires_compile or add_blink_tests: | 760 if requires_compile or add_blink_tests: |
| 772 tests = tests_in_compile_targets(api, matching_exes, tests) | 761 tests = tests_in_compile_targets(api, matching_exes, tests) |
| 773 tests_including_triggered = tests_in_compile_targets( | 762 tests_including_triggered = tests_in_compile_targets( |
| 774 api, matching_exes, tests_including_triggered) | 763 api, matching_exes, tests_including_triggered) |
| 775 | 764 |
| 776 # Blink tests are tricky at this moment. We'd like to use "analyze" for | 765 # Blink tests are tricky at this moment. We'd like to use "analyze" for |
| 777 # everything else. However, there are blink changes that only add or modify | 766 # everything else. However, there are blink changes that only add or modify |
| 778 # layout test files (html etc). This is not recognized by "analyze" as | 767 # layout test files (html etc). This is not recognized by "analyze" as |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1599 api.test_utils.canned_test_output(passing=True)) | 1588 api.test_utils.canned_test_output(passing=True)) |
| 1600 ) | 1589 ) |
| 1601 | 1590 |
| 1602 yield ( | 1591 yield ( |
| 1603 api.test('use_v8_patch_on_blink_trybot') + | 1592 api.test('use_v8_patch_on_blink_trybot') + |
| 1604 props(mastername='tryserver.blink', | 1593 props(mastername='tryserver.blink', |
| 1605 buildername='mac_blink_rel', | 1594 buildername='mac_blink_rel', |
| 1606 patch_project='v8') + | 1595 patch_project='v8') + |
| 1607 api.platform.name('mac') | 1596 api.platform.name('mac') |
| 1608 ) | 1597 ) |
| OLD | NEW |