Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 collections import defaultdict | 5 from collections import defaultdict |
| 6 import json | 6 import json |
| 7 | 7 |
| 8 from recipe_engine.config import Dict | 8 from recipe_engine.config import Dict |
| 9 from recipe_engine.config import List | 9 from recipe_engine.config import List |
| 10 from recipe_engine.config import Single | 10 from recipe_engine.config import Single |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 FAILED = 'failed' # The compile or test failed. | 73 FAILED = 'failed' # The compile or test failed. |
| 74 INFRA_FAILED = 'infra_failed' # Infra failed. | 74 INFRA_FAILED = 'infra_failed' # Infra failed. |
| 75 | 75 |
| 76 | 76 |
| 77 def _compile_and_test_at_revision(api, target_mastername, target_buildername, | 77 def _compile_and_test_at_revision(api, target_mastername, target_buildername, |
| 78 target_testername, revision, requested_tests, | 78 target_testername, revision, requested_tests, |
| 79 use_analyze): | 79 use_analyze): |
| 80 results = {} | 80 results = {} |
| 81 with api.step.nest('test %s' % str(revision)): | 81 with api.step.nest('test %s' % str(revision)): |
| 82 # Checkout code at the given revision to recompile. | 82 # Checkout code at the given revision to recompile. |
| 83 bot_config = api.chromium_tests.create_bot_config_object( | 83 bot_id = { |
| 84 target_mastername, target_buildername) | 84 'mastername': target_mastername, |
| 85 'buildername': target_buildername, | |
| 86 'tester': target_testername} | |
| 87 bot_config = api.chromium_tests.create_generalized_bot_config_object( | |
| 88 [bot_id]) | |
| 85 bot_update_step, bot_db = api.chromium_tests.prepare_checkout( | 89 bot_update_step, bot_db = api.chromium_tests.prepare_checkout( |
| 86 bot_config, root_solution_revision=revision) | 90 bot_config, root_solution_revision=revision) |
| 87 | 91 |
| 88 # Figure out which test steps to run. | 92 # Figure out which test steps to run. |
| 89 _, all_tests = api.chromium_tests.get_tests(bot_config, bot_db) | 93 all_tests, _ = api.chromium_tests.get_tests(bot_config, bot_db) |
|
stgao
2016/06/15 05:22:15
double check: without change to https://chromium.g
| |
| 90 requested_tests_to_run = [ | 94 requested_tests_to_run = [ |
| 91 test for test in all_tests if test.name in requested_tests] | 95 test for test in all_tests if test.name in requested_tests] |
| 92 | 96 |
| 93 # Figure out the test targets to be compiled. | 97 # Figure out the test targets to be compiled. |
| 94 requested_test_targets = [] | 98 requested_test_targets = [] |
| 95 for test in requested_tests_to_run: | 99 for test in requested_tests_to_run: |
| 96 requested_test_targets.extend(test.compile_targets(api)) | 100 requested_test_targets.extend(test.compile_targets(api)) |
| 97 requested_test_targets = sorted(set(requested_test_targets)) | 101 requested_test_targets = sorted(set(requested_test_targets)) |
| 98 | 102 |
| 99 actual_tests_to_run = requested_tests_to_run | 103 actual_tests_to_run = requested_tests_to_run |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1092 'git commits in range', | 1096 'git commits in range', |
| 1093 api.raw_io.stream_output( | 1097 api.raw_io.stream_output( |
| 1094 '\n'.join('r%d' % i for i in reversed(range(1, 7))))) + | 1098 '\n'.join('r%d' % i for i in reversed(range(1, 7))))) + |
| 1095 api.override_step_data( | 1099 api.override_step_data( |
| 1096 'test r2.gl_tests (r2) on Mac-10.9', | 1100 'test r2.gl_tests (r2) on Mac-10.9', |
| 1097 simulated_gtest_output(passed_test_names=['Test.One'])) + | 1101 simulated_gtest_output(passed_test_names=['Test.One'])) + |
| 1098 api.override_step_data( | 1102 api.override_step_data( |
| 1099 'test r3.gl_tests (r3) on Mac-10.9', | 1103 'test r3.gl_tests (r3) on Mac-10.9', |
| 1100 simulated_gtest_output(failed_test_names=['Test.One'])) | 1104 simulated_gtest_output(failed_test_names=['Test.One'])) |
| 1101 ) | 1105 ) |
| OLD | NEW |