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 argparse | 5 import argparse |
| 6 import collections | 6 import collections |
| 7 import datetime | 7 import datetime |
| 8 import math | 8 import math |
| 9 import re | 9 import re |
| 10 import urllib | 10 import urllib |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 996 'merge perf results' + kwargs.pop('suffix', ''), | 996 'merge perf results' + kwargs.pop('suffix', ''), |
| 997 self.resource('merge_perf_result_maps.py'), | 997 self.resource('merge_perf_result_maps.py'), |
| 998 [self.m.json.input(results_file_map)], | 998 [self.m.json.input(results_file_map)], |
| 999 stdout=self.m.json.output(), | 999 stdout=self.m.json.output(), |
| 1000 ).stdout | 1000 ).stdout |
| 1001 | 1001 |
| 1002 def maybe_trigger(self, **additional_properties): | 1002 def maybe_trigger(self, **additional_properties): |
| 1003 triggers = self.bot_config.get('triggers') | 1003 triggers = self.bot_config.get('triggers') |
| 1004 if triggers: | 1004 if triggers: |
| 1005 properties = { | 1005 properties = { |
| 1006 'revision': self.revision, | |
| 1007 'parent_got_revision': self.revision, | 1006 'parent_got_revision': self.revision, |
| 1008 'parent_got_revision_cp': self.revision_cp, | 1007 'parent_got_revision_cp': self.revision_cp, |
| 1009 } | 1008 } |
| 1010 if self.m.tryserver.is_tryserver: | 1009 if self.m.tryserver.is_tryserver: |
| 1011 properties.update( | 1010 properties.update( |
| 1012 issue=self.m.properties['issue'], | 1011 issue=self.m.properties['issue'], |
| 1013 patch_project=str(self.m.properties['patch_project']), | 1012 patch_project=str(self.m.properties['patch_project']), |
| 1014 patch_storage=str(self.m.properties['patch_storage']), | 1013 patch_storage=str(self.m.properties['patch_storage']), |
| 1015 patchset=str(self.m.properties['patchset']), | 1014 patchset=str(self.m.properties['patchset']), |
| 1016 requester=str(self.m.properties['requester']), | 1015 requester=str(self.m.properties['requester']), |
| 1016 revision=str(self.m.properties.get('revision', 'HEAD')), | |
| 1017 rietveld=str(self.m.properties['rietveld']), | 1017 rietveld=str(self.m.properties['rietveld']), |
| 1018 ) | 1018 ) |
| 1019 else: | |
| 1020 # Don't set revision on tryservers, as CQ expects builders and | |
| 1021 # testers to match the revision field. | |
|
tandrii(chromium)
2015/12/02 17:13:04
this is confusing because it's in the "else" block
Michael Achenbach
2015/12/02 17:36:00
Improved my comments.
tandrii(chromium)
2015/12/02 17:39:46
yep, very readable now.
| |
| 1022 properties['revision'] = self.revision | |
| 1019 swarm_hashes = self.m.isolate.isolated_tests | 1023 swarm_hashes = self.m.isolate.isolated_tests |
| 1020 if swarm_hashes: | 1024 if swarm_hashes: |
| 1021 properties['swarm_hashes'] = swarm_hashes | 1025 properties['swarm_hashes'] = swarm_hashes |
| 1022 properties.update(**additional_properties) | 1026 properties.update(**additional_properties) |
| 1023 self.m.trigger(*[{ | 1027 self.m.trigger(*[{ |
| 1024 'builder_name': builder_name, | 1028 'builder_name': builder_name, |
| 1025 'properties': properties, | 1029 'properties': properties, |
| 1026 } for builder_name in triggers]) | 1030 } for builder_name in triggers]) |
| 1027 | 1031 |
| 1028 def get_change_range(self): | 1032 def get_change_range(self): |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1144 def report_culprits(self, culprit_range): | 1148 def report_culprits(self, culprit_range): |
| 1145 assert culprit_range | 1149 assert culprit_range |
| 1146 if len(culprit_range) > 1: | 1150 if len(culprit_range) > 1: |
| 1147 text = 'Suspecting multiple commits' | 1151 text = 'Suspecting multiple commits' |
| 1148 else: | 1152 else: |
| 1149 text = 'Suspecting %s' % culprit_range[0][:8] | 1153 text = 'Suspecting %s' % culprit_range[0][:8] |
| 1150 | 1154 |
| 1151 step_result = self.m.step(text, cmd=None) | 1155 step_result = self.m.step(text, cmd=None) |
| 1152 for culprit in culprit_range: | 1156 for culprit in culprit_range: |
| 1153 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit | 1157 step_result.presentation.links[culprit[:8]] = COMMIT_TEMPLATE % culprit |
| OLD | NEW |