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

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

Issue 2011733002: [Findit] Set use_analyze to False if the try job doesn't run linearly. (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 | scripts/slave/recipes/findit/chromium/test.expected/use_analyze_set_to_False_for_non_linear_try_job.json » ('j') | 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 # [[None, r0], [r1, r2, r3], [r4, r5, r6]] 253 # [[None, r0], [r1, r2, r3], [r4, r5, r6]]
254 if suspected_revision_index: 254 if suspected_revision_index:
255 # If there are consecutive revisions being suspected, include them 255 # If there are consecutive revisions being suspected, include them
256 # in the same sub_range by only saving the oldest revision. 256 # in the same sub_range by only saving the oldest revision.
257 suspected_revision_index = [i for i in suspected_revision_index 257 suspected_revision_index = [i for i in suspected_revision_index
258 if i - 1 not in suspected_revision_index] 258 if i - 1 not in suspected_revision_index]
259 sub_ranges = [] 259 sub_ranges = []
260 remaining_revisions = revisions_to_check[:] 260 remaining_revisions = revisions_to_check[:]
261 for index in sorted(suspected_revision_index, reverse=True): 261 for index in sorted(suspected_revision_index, reverse=True):
262 if index > 0: 262 if index > 0:
263 # try job will not run linearly, sets use_analyze to False.
264 use_analyze = False
stgao 2016/05/25 00:57:52 what if the only suspected revision is with index
chanli 2016/05/25 00:59:54 If the only suspected revision is with index 0, th
263 sub_ranges.append(remaining_revisions[index - 1:]) 265 sub_ranges.append(remaining_revisions[index - 1:])
264 remaining_revisions = remaining_revisions[:index - 1] 266 remaining_revisions = remaining_revisions[:index - 1]
265 # None is a placeholder for the last known good revision. 267 # None is a placeholder for the last known good revision.
266 sub_ranges.append([None] + remaining_revisions) 268 sub_ranges.append([None] + remaining_revisions)
267 else: 269 else:
268 # Treats the entire regression range as a single sub-range. 270 # Treats the entire regression range as a single sub-range.
269 sub_ranges = [[None] + revisions_to_check] 271 sub_ranges = [[None] + revisions_to_check]
270 272
271 test_results = {} 273 test_results = {}
272 try_job_metadata = { 274 try_job_metadata = {
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 api.override_step_data( 1055 api.override_step_data(
1054 'test r4.gl_tests (r4) on Mac-10.9', 1056 'test r4.gl_tests (r4) on Mac-10.9',
1055 simulated_gtest_output(failed_test_names=['Test.One'])) + 1057 simulated_gtest_output(failed_test_names=['Test.One'])) +
1056 api.override_step_data( 1058 api.override_step_data(
1057 'test r2.gl_tests (r2) on Mac-10.9', 1059 'test r2.gl_tests (r2) on Mac-10.9',
1058 simulated_gtest_output(passed_test_names=['Test.One'])) + 1060 simulated_gtest_output(passed_test_names=['Test.One'])) +
1059 api.override_step_data( 1061 api.override_step_data(
1060 'test r3.gl_tests (r3) on Mac-10.9', 1062 'test r3.gl_tests (r3) on Mac-10.9',
1061 simulated_gtest_output(passed_test_names=['Test.One'])) 1063 simulated_gtest_output(passed_test_names=['Test.One']))
1062 ) 1064 )
1065
1066 yield (
1067 api.test('use_analyze_set_to_False_for_non_linear_try_job') +
1068 props(
1069 {'gl_tests': ['Test.One']}, 'mac', 'Mac10.9 Tests', use_analyze=True,
1070 good_revision='r0', bad_revision='r6', suspected_revisions=['r3']) +
1071 api.override_step_data('test r2.read test spec', api.json.output({
1072 'Mac10.9 Tests': {
1073 'gtest_tests': [
1074 {
1075 'test': 'gl_tests',
1076 'swarming': {'can_use_on_swarming_builders': True},
1077 },
1078 ],
1079 },
1080 })) +
1081 api.override_step_data('test r3.read test spec', api.json.output({
1082 'Mac10.9 Tests': {
1083 'gtest_tests': [
1084 {
1085 'test': 'gl_tests',
1086 'swarming': {'can_use_on_swarming_builders': True},
1087 },
1088 ],
1089 },
1090 })) +
1091 api.override_step_data(
1092 'git commits in range',
1093 api.raw_io.stream_output(
1094 '\n'.join('r%d' % i for i in reversed(range(1, 7))))) +
1095 api.override_step_data(
1096 'test r2.gl_tests (r2) on Mac-10.9',
1097 simulated_gtest_output(passed_test_names=['Test.One'])) +
1098 api.override_step_data(
1099 'test r3.gl_tests (r3) on Mac-10.9',
1100 simulated_gtest_output(failed_test_names=['Test.One']))
1101 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/findit/chromium/test.expected/use_analyze_set_to_False_for_non_linear_try_job.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698