| 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 wrapper used in SwarmBucket. | 6 # Recipe wrapper used in SwarmBucket. |
| 7 | 7 |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'build/file', | 10 'build/file', |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 soln.name = 'skia' | 33 soln.name = 'skia' |
| 34 soln.url = 'https://skia.googlesource.com/skia.git' | 34 soln.url = 'https://skia.googlesource.com/skia.git' |
| 35 soln.revision = api.properties.get('revision', 'origin/master') | 35 soln.revision = api.properties.get('revision', 'origin/master') |
| 36 api.gclient.c = gclient_cfg | 36 api.gclient.c = gclient_cfg |
| 37 api.gclient.c.got_revision_mapping['skia'] = 'got_revision' | 37 api.gclient.c.got_revision_mapping['skia'] = 'got_revision' |
| 38 | 38 |
| 39 # Set up options for bot_update based on properties. In general, these will | 39 # Set up options for bot_update based on properties. In general, these will |
| 40 # all take the default value. | 40 # all take the default value. |
| 41 patch = api.properties.get('patch', True) | 41 patch = api.properties.get('patch', True) |
| 42 clobber = True if api.properties.get('clobber') else False | 42 clobber = True if api.properties.get('clobber') else False |
| 43 force = True if api.properties.get('force') else False | |
| 44 no_shallow = True if api.properties.get('no_shallow') else False | 43 no_shallow = True if api.properties.get('no_shallow') else False |
| 45 output_manifest = api.properties.get('output_manifest', False) | 44 output_manifest = api.properties.get('output_manifest', False) |
| 46 with_branch_heads = api.properties.get('with_branch_heads', False) | 45 with_branch_heads = api.properties.get('with_branch_heads', False) |
| 47 refs = api.properties.get('refs', []) | 46 refs = api.properties.get('refs', []) |
| 48 oauth2 = api.properties.get('oauth2', False) | 47 oauth2 = api.properties.get('oauth2', False) |
| 49 root_solution_revision = api.properties.get('root_solution_revision') | 48 root_solution_revision = api.properties.get('root_solution_revision') |
| 50 suffix = api.properties.get('suffix') | 49 suffix = api.properties.get('suffix') |
| 51 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False | 50 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False |
| 52 | 51 |
| 53 # Run bot_update to sync the code and apply a patch if necessary. | 52 # Run bot_update to sync the code and apply a patch if necessary. |
| 54 api.bot_update.ensure_checkout(force=force, | 53 api.bot_update.ensure_checkout(no_shallow=no_shallow, |
| 55 no_shallow=no_shallow, | |
| 56 patch=patch, | 54 patch=patch, |
| 57 with_branch_heads=with_branch_heads, | 55 with_branch_heads=with_branch_heads, |
| 58 output_manifest=output_manifest, | 56 output_manifest=output_manifest, |
| 59 refs=refs, patch_oauth2=oauth2, | 57 refs=refs, patch_oauth2=oauth2, |
| 60 clobber=clobber, | 58 clobber=clobber, |
| 61 root_solution_revision=root_solution_revision, | 59 root_solution_revision=root_solution_revision, |
| 62 suffix=suffix, | 60 suffix=suffix, |
| 63 gerrit_no_reset=gerrit_no_reset, | 61 gerrit_no_reset=gerrit_no_reset, |
| 64 cwd=workdir) | 62 cwd=workdir) |
| 65 | 63 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 110 |
| 113 def GenTests(api): | 111 def GenTests(api): |
| 114 yield ( | 112 yield ( |
| 115 api.test('trigger_recipe') + | 113 api.test('trigger_recipe') + |
| 116 api.properties(buildername='Some-Builder', | 114 api.properties(buildername='Some-Builder', |
| 117 buildnumber=5, | 115 buildnumber=5, |
| 118 mastername='client.skia.fyi', | 116 mastername='client.skia.fyi', |
| 119 slavename='some-slave', | 117 slavename='some-slave', |
| 120 path_config='swarmbucket') | 118 path_config='swarmbucket') |
| 121 ) | 119 ) |
| OLD | NEW |