| OLD | NEW |
| (Empty) |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 DEPS = [ | |
| 6 'bot_update', | |
| 7 'gclient', | |
| 8 'recipe_engine/path', | |
| 9 'recipe_engine/properties', | |
| 10 ] | |
| 11 | |
| 12 def RunSteps(api): | |
| 13 api.gclient.use_mirror = True | |
| 14 | |
| 15 src_cfg = api.gclient.make_config() | |
| 16 soln = src_cfg.solutions.add() | |
| 17 soln.name = 'src' | |
| 18 soln.url = 'svn://svn.chromium.org/chrome/trunk/src' | |
| 19 soln.revision = api.properties.get('revision') | |
| 20 api.gclient.c = src_cfg | |
| 21 api.gclient.c.revisions = api.properties.get('revisions', {}) | |
| 22 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' | |
| 23 patch = api.properties.get('patch', True) | |
| 24 clobber = True if api.properties.get('clobber') else False | |
| 25 force = True if api.properties.get('force') else False | |
| 26 no_shallow = True if api.properties.get('no_shallow') else False | |
| 27 output_manifest = api.properties.get('output_manifest', False) | |
| 28 with_branch_heads = api.properties.get('with_branch_heads', False) | |
| 29 refs = api.properties.get('refs', []) | |
| 30 oauth2 = api.properties.get('oauth2', False) | |
| 31 root_solution_revision = api.properties.get('root_solution_revision') | |
| 32 suffix = api.properties.get('suffix') | |
| 33 api.bot_update.ensure_checkout(force=force, | |
| 34 no_shallow=no_shallow, | |
| 35 patch=patch, | |
| 36 with_branch_heads=with_branch_heads, | |
| 37 output_manifest=output_manifest, | |
| 38 refs=refs, patch_oauth2=oauth2, | |
| 39 clobber=clobber, | |
| 40 root_solution_revision=root_solution_revision, | |
| 41 suffix=suffix) | |
| 42 | |
| 43 | |
| 44 def GenTests(api): | |
| 45 yield api.test('basic') + api.properties( | |
| 46 mastername='chromium.linux', | |
| 47 buildername='Linux Builder', | |
| 48 slavename='totallyaslave-m1', | |
| 49 patch=False, | |
| 50 revision='abc' | |
| 51 ) | |
| 52 yield api.test('basic_with_branch_heads') + api.properties( | |
| 53 mastername='chromium.linux', | |
| 54 buildername='Linux Builder', | |
| 55 slavename='totallyaslave-m1', | |
| 56 with_branch_heads=True, | |
| 57 suffix='with branch heads' | |
| 58 ) | |
| 59 yield api.test('basic_output_manifest') + api.properties( | |
| 60 mastername='chromium.linux', | |
| 61 buildername='Linux Builder', | |
| 62 slavename='totallyaslave-m1', | |
| 63 output_manifest=True, | |
| 64 ) | |
| 65 yield api.test('tryjob') + api.properties( | |
| 66 mastername='tryserver.chromium.linux', | |
| 67 buildername='linux_rel', | |
| 68 slavename='totallyaslave-c4', | |
| 69 issue=12345, | |
| 70 patchset=654321, | |
| 71 patch_url='http://src.chromium.org/foo/bar' | |
| 72 ) | |
| 73 yield api.test('trychange') + api.properties( | |
| 74 mastername='tryserver.chromium.linux', | |
| 75 buildername='linux_rel', | |
| 76 slavename='totallyaslave-c4', | |
| 77 refs=['+refs/change/1/2/333'], | |
| 78 ) | |
| 79 yield api.test('trychange_oauth2') + api.properties( | |
| 80 mastername='tryserver.chromium.linux', | |
| 81 buildername='linux_rel', | |
| 82 slavename='totallyaslave-c4', | |
| 83 oauth2=True, | |
| 84 ) | |
| 85 yield api.test('tryjob_fail') + api.properties( | |
| 86 mastername='tryserver.chromium.linux', | |
| 87 buildername='linux_rel', | |
| 88 slavename='totallyaslave-c4', | |
| 89 issue=12345, | |
| 90 patchset=654321, | |
| 91 patch_url='http://src.chromium.org/foo/bar', | |
| 92 ) + api.step_data('bot_update', retcode=1) | |
| 93 yield api.test('tryjob_fail_patch') + api.properties( | |
| 94 mastername='tryserver.chromium.linux', | |
| 95 buildername='linux_rel', | |
| 96 slavename='totallyaslave-c4', | |
| 97 issue=12345, | |
| 98 patchset=654321, | |
| 99 patch_url='http://src.chromium.org/foo/bar', | |
| 100 fail_patch='apply', | |
| 101 ) + api.step_data('bot_update', retcode=88) | |
| 102 yield api.test('tryjob_fail_patch_download') + api.properties( | |
| 103 mastername='tryserver.chromium.linux', | |
| 104 buildername='linux_rel', | |
| 105 slavename='totallyaslave-c4', | |
| 106 issue=12345, | |
| 107 patchset=654321, | |
| 108 patch_url='http://src.chromium.org/foo/bar', | |
| 109 fail_patch='download' | |
| 110 ) + api.step_data('bot_update', retcode=87) | |
| 111 yield api.test('forced') + api.properties( | |
| 112 mastername='experimental', | |
| 113 buildername='Experimental Builder', | |
| 114 slavename='somehost', | |
| 115 force=1 | |
| 116 ) | |
| 117 yield api.test('no_shallow') + api.properties( | |
| 118 mastername='experimental', | |
| 119 buildername='Experimental Builder', | |
| 120 slavename='somehost', | |
| 121 no_shallow=1 | |
| 122 ) | |
| 123 yield api.test('off') + api.properties( | |
| 124 mastername='experimental', | |
| 125 buildername='Experimental Builder', | |
| 126 slavename='somehost', | |
| 127 ) | |
| 128 yield api.test('svn_mode') + api.properties( | |
| 129 mastername='experimental.svn', | |
| 130 buildername='Experimental SVN Builder', | |
| 131 slavename='somehost', | |
| 132 force=1 | |
| 133 ) | |
| 134 yield api.test('clobber') + api.properties( | |
| 135 mastername='experimental', | |
| 136 buildername='Experimental Builder', | |
| 137 slavename='somehost', | |
| 138 clobber=1 | |
| 139 ) | |
| 140 yield api.test('reset_root_solution_revision') + api.properties( | |
| 141 mastername='experimental', | |
| 142 buildername='Experimental Builder', | |
| 143 slavename='somehost', | |
| 144 root_solution_revision='revision', | |
| 145 ) | |
| 146 yield api.test('tryjob_v8') + api.properties( | |
| 147 mastername='tryserver.chromium.linux', | |
| 148 buildername='linux_rel', | |
| 149 slavename='totallyaslave-c4', | |
| 150 issue=12345, | |
| 151 patchset=654321, | |
| 152 patch_url='http://src.chromium.org/foo/bar', | |
| 153 patch_project='v8', | |
| 154 revisions={'src/v8': 'abc'} | |
| 155 ) | |
| OLD | NEW |