OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
6 # Recipe module for Skia Swarming trigger. | 6 # Recipe module for Skia Swarming trigger. |
7 | 7 |
8 | 8 |
9 import os | 9 import os |
10 import json | 10 import json |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 'buildnumber': buildnumber, | 205 'buildnumber': buildnumber, |
206 'reason': 'Triggered by Skia swarm_trigger Recipe', | 206 'reason': 'Triggered by Skia swarm_trigger Recipe', |
207 'revision': got_revision, | 207 'revision': got_revision, |
208 'slavename': slave, | 208 'slavename': slave, |
209 'swarm_out_dir': '${ISOLATED_OUTDIR}', | 209 'swarm_out_dir': '${ISOLATED_OUTDIR}', |
210 } | 210 } |
211 if builder_cfg['is_trybot']: | 211 if builder_cfg['is_trybot']: |
212 if api.properties.get('patch_storage') == 'gerrit': | 212 if api.properties.get('patch_storage') == 'gerrit': |
213 properties['patch_storage'] = api.properties['patch_storage'] | 213 properties['patch_storage'] = api.properties['patch_storage'] |
214 properties['repository'] = api.properties['repository'] | 214 properties['repository'] = api.properties['repository'] |
215 properties['event.patchSet.ref'] = api.properties['event.patchSet.ref'] | 215 properties['patch_ref'] = api.properties['patch_ref'] |
216 properties['event.change.number'] = api.properties['event.change.number'] | 216 properties['patch_issue'] = api.properties['patch_issue'] |
217 else: | 217 else: |
218 properties['issue'] = str(api.properties['issue']) | 218 properties['issue'] = str(api.properties['issue']) |
219 properties['patchset'] = str(api.properties['patchset']) | 219 properties['patchset'] = str(api.properties['patchset']) |
220 properties['rietveld'] = api.properties['rietveld'] | 220 properties['rietveld'] = api.properties['rietveld'] |
221 | 221 |
222 extra_args = [ | 222 extra_args = [ |
223 '--workdir', '../../..', | 223 '--workdir', '../../..', |
224 recipe_name or 'swarm_%s' % task_name, | 224 recipe_name or 'swarm_%s' % task_name, |
225 ] | 225 ] |
226 for k, v in properties.iteritems(): | 226 for k, v in properties.iteritems(): |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 | 740 |
741 def GenTests(api): | 741 def GenTests(api): |
742 for mastername, slaves in TEST_BUILDERS.iteritems(): | 742 for mastername, slaves in TEST_BUILDERS.iteritems(): |
743 for slavename, builders_by_slave in slaves.iteritems(): | 743 for slavename, builders_by_slave in slaves.iteritems(): |
744 for builder in builders_by_slave: | 744 for builder in builders_by_slave: |
745 yield test_for_bot(api, builder, mastername, slavename) | 745 yield test_for_bot(api, builder, mastername, slavename) |
746 | 746 |
747 gerrit_kwargs = { | 747 gerrit_kwargs = { |
748 'patch_storage': 'gerrit', | 748 'patch_storage': 'gerrit', |
749 'repository': 'skia', | 749 'repository': 'skia', |
750 'event.patchSet.ref': 'refs/changes/00/2100/2', | 750 'patch_ref': 'refs/changes/00/2100/2', |
751 'event.change.number': '2100', | 751 'patch_issue': '2100', |
| 752 'patch_set': '2', |
752 } | 753 } |
753 yield ( | 754 yield ( |
754 api.test('recipe_with_gerrit_patch') + | 755 api.test('recipe_with_gerrit_patch') + |
755 api.properties( | 756 api.properties( |
756 buildername='Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot', | 757 buildername='Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-Trybot', |
757 mastername='client.skia', | 758 mastername='client.skia', |
758 slavename='skiabot-linux-swarm-000', | 759 slavename='skiabot-linux-swarm-000', |
759 buildnumber=5, | 760 buildnumber=5, |
760 path_config='kitchen', | 761 path_config='kitchen', |
761 revision='abc123', | 762 revision='abc123', |
762 **gerrit_kwargs) + | 763 **gerrit_kwargs) + |
763 api.step_data( | 764 api.step_data( |
764 'upload new .isolated file for test_skia', | 765 'upload new .isolated file for test_skia', |
765 stdout=api.raw_io.output('def456 XYZ.isolated')) + | 766 stdout=api.raw_io.output('def456 XYZ.isolated')) + |
766 api.step_data( | 767 api.step_data( |
767 'upload new .isolated file for upload_dm_results_skia', | 768 'upload new .isolated file for upload_dm_results_skia', |
768 stdout=api.raw_io.output('def456 XYZ.isolated')) | 769 stdout=api.raw_io.output('def456 XYZ.isolated')) |
769 ) | 770 ) |
OLD | NEW |