| 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 from infra.libs.infra_types import freeze | 5 from infra.libs.infra_types import freeze |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'bot_update', | 8 'bot_update', |
| 9 'chromium', | 9 'chromium', |
| 10 'chromium_android', | 10 'chromium_android', |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 ], | 601 ], |
| 602 }) | 602 }) |
| 603 ) + | 603 ) + |
| 604 suppress_analyze() | 604 suppress_analyze() |
| 605 ) | 605 ) |
| 606 | 606 |
| 607 yield ( | 607 yield ( |
| 608 api.test('no_compile_because_of_analyze') + | 608 api.test('no_compile_because_of_analyze') + |
| 609 props(buildername='linux_chromium_rel_ng') + | 609 props(buildername='linux_chromium_rel_ng') + |
| 610 api.platform.name('linux') + | 610 api.platform.name('linux') + |
| 611 api.override_step_data('read test spec', api.json.output({ | 611 api.override_step_data('read test spec', api.json.output({})) |
| 612 }) | |
| 613 ) | |
| 614 ) | 612 ) |
| 615 | 613 |
| 616 # Verifies analyze skips projects other than src. | 614 # Verifies analyze skips projects other than src. |
| 617 yield ( | 615 yield ( |
| 618 api.test('dont_analyze_for_non_src_project') + | 616 api.test('dont_analyze_for_non_src_project') + |
| 619 props(buildername='linux_chromium_rel_ng') + | 617 props(buildername='linux_chromium_rel_ng') + |
| 620 props(patch_project='blink') + | 618 props(patch_project='blink') + |
| 621 api.platform.name('linux') + | 619 api.platform.name('linux') + |
| 622 api.override_step_data('read test spec', api.json.output({ | 620 api.override_step_data('read test spec', api.json.output({})) |
| 623 }) | |
| 624 ) | |
| 625 ) | 621 ) |
| 626 | 622 |
| 627 # This should result in a compile. | 623 # This should result in a compile. |
| 628 yield ( | 624 yield ( |
| 629 api.test('compile_because_of_analyze_matching_exclusion') + | 625 api.test('compile_because_of_analyze_matching_exclusion') + |
| 630 props(buildername='linux_chromium_rel_ng') + | 626 props(buildername='linux_chromium_rel_ng') + |
| 631 api.platform.name('linux') + | 627 api.platform.name('linux') + |
| 632 api.override_step_data('read test spec', api.json.output({})) + | 628 api.override_step_data('read test spec', api.json.output({})) + |
| 633 suppress_analyze() | 629 suppress_analyze() |
| 634 ) | 630 ) |
| 635 | 631 |
| 636 # This should result in a compile. | 632 # This should result in a compile. |
| 637 yield ( | 633 yield ( |
| 638 api.test('compile_because_of_analyze') + | 634 api.test('compile_because_of_analyze') + |
| 639 props(buildername='linux_chromium_rel_ng') + | 635 props(buildername='linux_chromium_rel_ng') + |
| 640 api.platform.name('linux') + | 636 api.platform.name('linux') + |
| 641 api.override_step_data('read test spec', api.json.output({ | 637 api.override_step_data('read test spec', api.json.output({})) + |
| 642 }) | |
| 643 ) + | |
| 644 api.override_step_data( | 638 api.override_step_data( |
| 645 'analyze', | 639 'analyze', |
| 646 api.json.output({'status': 'Found dependency', 'targets': [], | 640 api.json.output({'status': 'Found dependency', 'targets': [], |
| 647 'build_targets': []})) | 641 'build_targets': []})) |
| 648 ) | 642 ) |
| 649 | 643 |
| 650 yield ( | 644 yield ( |
| 651 api.test('compile_because_of_analyze_with_filtered_tests_no_builder') + | 645 api.test('compile_because_of_analyze_with_filtered_tests_no_builder') + |
| 652 props(buildername='linux_chromium_rel_ng') + | 646 props(buildername='linux_chromium_rel_ng') + |
| 653 api.platform.name('linux') + | 647 api.platform.name('linux') + |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 ) | 799 ) |
| 806 | 800 |
| 807 yield ( | 801 yield ( |
| 808 api.test('use_v8_patch_on_chromium_trybot') + | 802 api.test('use_v8_patch_on_chromium_trybot') + |
| 809 props(buildername='win_chromium_rel_ng', | 803 props(buildername='win_chromium_rel_ng', |
| 810 mastername='tryserver.chromium.win', | 804 mastername='tryserver.chromium.win', |
| 811 patch_project='v8') + | 805 patch_project='v8') + |
| 812 api.platform.name('win') | 806 api.platform.name('win') |
| 813 ) | 807 ) |
| 814 | 808 |
| 809 # Tests that we only run the gpu_unittests isolate if that's all |
| 810 # that analyze said to rebuild. |
| 811 all_hashes = api.gpu.dummy_swarm_hashes |
| 812 angle_unittests_hash = {x: all_hashes[x] for x in ['gpu_unittests']} |
| 813 yield ( |
| 814 api.test('analyze_runs_only_gpu_unittests') + |
| 815 api.properties.tryserver( |
| 816 mastername='tryserver.chromium.win', |
| 817 buildername='win_chromium_rel_ng', |
| 818 swarm_hashes=angle_unittests_hash |
| 819 ) + |
| 820 api.platform.name('win') + |
| 821 api.override_step_data('analyze', api.gpu.analyze_builds_gpu_unittests) |
| 822 ) |
| 823 |
| 824 # Tests that we run nothing if analyze said we didn't have to run anything. |
| 825 yield ( |
| 826 api.test('analyze_runs_nothing') + |
| 827 api.properties.tryserver( |
| 828 mastername='tryserver.chromium.win', |
| 829 buildername='win_chromium_rel_ng', |
| 830 swarm_hashes={} |
| 831 ) + |
| 832 api.platform.name('win') + |
| 833 api.override_step_data('analyze', api.gpu.analyze_builds_nothing) |
| 834 ) |
| 835 |
| 815 def step_failure(mastername, buildername, steps, tryserver=False): | 836 def step_failure(mastername, buildername, steps, tryserver=False): |
| 816 props = api.properties.tryserver if tryserver else api.properties.generic | 837 props = api.properties.tryserver if tryserver else api.properties.generic |
| 817 return ( | 838 return ( |
| 818 api.test('%s_%s_fail_%s' % ( | 839 api.test('%s_%s_fail_%s' % ( |
| 819 _sanitize_nonalpha(mastername), | 840 _sanitize_nonalpha(mastername), |
| 820 _sanitize_nonalpha(buildername), | 841 _sanitize_nonalpha(buildername), |
| 821 '_'.join(_sanitize_nonalpha(step) for step in steps))) + | 842 '_'.join(_sanitize_nonalpha(step) for step in steps))) + |
| 822 props(mastername=mastername, buildername=buildername) + | 843 props(mastername=mastername, buildername=buildername) + |
| 823 suppress_analyze() + | 844 suppress_analyze() + |
| 824 reduce(lambda a, b: a + b, | 845 reduce(lambda a, b: a + b, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 835 tryserver=True) | 856 tryserver=True) |
| 836 yield step_failure(mastername='tryserver.chromium.linux', | 857 yield step_failure(mastername='tryserver.chromium.linux', |
| 837 buildername='android_clang_dbg_recipe', | 858 buildername='android_clang_dbg_recipe', |
| 838 steps=['findbugs (with patch)'], | 859 steps=['findbugs (with patch)'], |
| 839 tryserver=True) | 860 tryserver=True) |
| 840 yield step_failure(mastername='tryserver.chromium.linux', | 861 yield step_failure(mastername='tryserver.chromium.linux', |
| 841 buildername='android_clang_dbg_recipe', | 862 buildername='android_clang_dbg_recipe', |
| 842 steps=['findbugs (with patch)', | 863 steps=['findbugs (with patch)', |
| 843 'findbugs (without patch)'], | 864 'findbugs (without patch)'], |
| 844 tryserver=True) | 865 tryserver=True) |
| OLD | NEW |