Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: scripts/slave/recipes/findit/chromium/test.py

Issue 2064033002: [Findit] Fix 'Trigger same task twice' error. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: . Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698