Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from infra.libs.infra_types import freeze | |
| 6 from recipe_engine import recipe_api | |
| 7 | |
| 8 DEPS = [ | |
| 9 'archive', | |
| 10 'bot_update', | |
| 11 'chromedriver', | |
| 12 'chromium', | |
| 13 'chromium_android', | |
| 14 'commit_position', | |
| 15 'gclient', | |
| 16 'platform', | |
| 17 'properties', | |
| 18 'raw_io', | |
| 19 ] | |
| 20 | |
| 21 BUILDERS = freeze({ | |
| 22 'chromium.fyi': { | |
| 23 'Android ChromeDriver Tests (dbg)': { | |
|
luqui
2015/08/06 20:52:58
This looks like a real recipe that you're planning
mikecase (-- gone --)
2016/04/04 21:46:42
Changed this example to look less like an actual r
| |
| 24 # Whether or not to update the test results log (Android only). | |
| 25 'update_log': True, | |
| 26 'android_packages': [ | |
| 27 'chrome_shell', | |
| 28 'chrome_stable', | |
| 29 'chrome_beta', | |
| 30 'chromedriver_webview_shell', | |
| 31 ], | |
| 32 }, | |
| 33 'Linux ChromeDriver Tests (dbg)': {}, | |
| 34 'Mac ChromeDriver Tests (dbg)': {}, | |
| 35 'Windows ChromeDriver Tests (dbg)': {}, | |
| 36 }, | |
| 37 }) | |
| 38 | |
| 39 REPO_URL = 'svn://svn-mirror.golo.chromium.org/chrome/trunk/src' | |
|
luqui
2015/08/06 20:52:58
Aren't we on git now?
mikecase (-- gone --)
2016/04/04 21:46:42
Yes, seems like I had copied the url from
build/s
| |
| 40 | |
| 41 def RunSteps(api): | |
| 42 mastername = api.properties['mastername'] | |
| 43 buildername = api.properties['buildername'] | |
| 44 builder = BUILDERS[mastername][buildername] | |
| 45 android_packages = builder.get('android_packages') | |
| 46 update_log = builder.get('update_log') | |
| 47 | |
| 48 api.chromium.set_config('chromium') | |
| 49 api.gclient.set_config('chromium') | |
| 50 api.bot_update.ensure_checkout(force=True) | |
| 51 platform = api.chromedriver.get_chromedriver_platform(bool(android_packages)) | |
| 52 | |
| 53 commit_position = api.commit_position.parse_revision( | |
| 54 api.properties['got_revision_cp']) | |
| 55 | |
| 56 if platform == 'android': | |
| 57 api.chromedriver.download_prebuilts() | |
| 58 else: | |
| 59 if platform == 'linux64': | |
| 60 api.chromedriver.archive_prebuilts(commit_position) | |
| 61 api.chromedriver.wait_for_latest_snapshot(commit_position) | |
| 62 | |
| 63 passed = api.chromedriver.run_all_tests(android_packages=android_packages) | |
| 64 api.chromedriver.archive_server_logs() | |
| 65 | |
| 66 if platform == 'android': | |
| 67 if update_log: | |
| 68 api.chromedriver.update_test_results_log( | |
| 69 platform, commit_position, passed) | |
| 70 elif passed: | |
| 71 api.chromedriver.archive_good_build(platform, commit_position) | |
| 72 api.chromedriver.maybe_release(platform) | |
| 73 | |
| 74 def GenTests(api): | |
| 75 | |
| 76 sanitize = lambda s: ''.join(c if c.isalnum() else '_' for c in s) | |
| 77 | |
| 78 yield ( | |
| 79 api.test('%s_basic' % sanitize('Android ChromeDriver')) + | |
| 80 api.properties.generic( | |
| 81 mastername='chromium.fyi', | |
| 82 buildername='Android ChromeDriver Tests (dbg)', | |
| 83 slavename='slavename') + | |
| 84 api.properties( | |
| 85 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 86 got_revision_cp='refs/heads/master@{#333333}')) | |
| 87 | |
| 88 yield ( | |
| 89 api.test('%s_basic' % sanitize('Linux64 ChromeDriver')) + | |
| 90 api.properties.generic( | |
| 91 mastername='chromium.fyi', | |
| 92 buildername='Linux ChromeDriver Tests (dbg)', | |
| 93 slavename='slavename') + | |
| 94 api.properties( | |
| 95 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 96 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 97 got_revision_cp='refs/heads/master@{#333333}') + | |
| 98 api.platform('linux', 64)) | |
| 99 | |
| 100 yield ( | |
| 101 api.test('%s_basic' % sanitize('Linux32 ChromeDriver')) + | |
| 102 api.properties.generic( | |
| 103 mastername='chromium.fyi', | |
| 104 buildername='Linux ChromeDriver Tests (dbg)', | |
| 105 slavename='slavename') + | |
| 106 api.properties( | |
| 107 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 108 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 109 got_revision_cp='refs/heads/master@{#333333}') + | |
| 110 api.platform('linux', 32)) | |
| 111 | |
| 112 yield ( | |
| 113 api.test('%s_basic' % sanitize('Windows ChromeDriver')) + | |
| 114 api.properties.generic( | |
| 115 mastername='chromium.fyi', | |
| 116 buildername='Windows ChromeDriver Tests (dbg)', | |
| 117 slavename='slavename') + | |
| 118 api.properties( | |
| 119 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 120 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 121 got_revision_cp='refs/heads/master@{#333333}') + | |
| 122 api.platform('win', 32)) | |
| 123 | |
| 124 yield ( | |
| 125 api.test('%s_basic' % sanitize('Mac ChromeDriver')) + | |
| 126 api.properties.generic( | |
| 127 mastername='chromium.fyi', | |
| 128 buildername='Mac ChromeDriver Tests (dbg)', | |
| 129 slavename='slavename') + | |
| 130 api.properties( | |
| 131 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 132 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 133 got_revision_cp='refs/heads/master@{#333333}') + | |
| 134 api.platform('mac', 32)) | |
| 135 | |
| 136 yield ( | |
| 137 api.test('%s_download_log_failure' % sanitize('Android ChromeDriver')) + | |
| 138 api.properties.generic( | |
| 139 buildername='Android ChromeDriver Tests (dbg)', | |
| 140 slavename='slavename', | |
| 141 mastername='chromium.fyi') + | |
| 142 api.properties( | |
| 143 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 144 got_revision_cp='refs/heads/master@{#333333}') + | |
| 145 api.step_data('gsutil download results log', retcode=1)) | |
| 146 | |
| 147 yield ( | |
| 148 api.test('%s_release_chromedriver' % sanitize('Linux64 ChromeDriver')) + | |
| 149 api.properties.generic( | |
| 150 mastername='chromium.fyi', | |
| 151 buildername='Linux ChromeDriver Tests (dbg)', | |
| 152 slavename='slavename') + | |
| 153 api.properties( | |
| 154 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 155 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 156 got_revision_cp='refs/heads/master@{#333333}') + | |
| 157 api.platform('linux', 64) + | |
| 158 api.step_data('gsutil list chromedriver versions', retcode=1)) | |
| 159 | |
| 160 release_candidate_list = '\n'.join([ | |
| 161 'test/dir/chromedriver_linux64_1.11.000000.zip', | |
| 162 'test/dir/chromedriver_linux64_9.99.111111.zip', | |
| 163 'test/dir/chromedriver_linux64_9.99.222222.zip', | |
| 164 'test/dir/chromedriver_linux64_9.99.333333.zip', | |
| 165 'test/dir/chromedriver_linux64_9.99.444444.zip', | |
| 166 'test/dir/chromedriver_linux64_9.99.555555.zip']) | |
| 167 test_results = '{"222222": false, "444444": false}' | |
| 168 yield ( | |
| 169 api.test('%s_release_with_failures' % sanitize('Linux64 ChromeDriver')) + | |
| 170 api.properties.generic( | |
| 171 mastername='chromium.fyi', | |
| 172 buildername='Linux ChromeDriver Tests (dbg)', | |
| 173 slavename='slavename') + | |
| 174 api.properties( | |
| 175 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 176 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 177 got_revision_cp='refs/heads/master@{#333333}') + | |
| 178 api.platform('linux', 64) + | |
| 179 api.step_data('gsutil list chromedriver versions', retcode=1) + | |
| 180 api.override_step_data( | |
| 181 'gsutil list release candidates', | |
| 182 api.raw_io.stream_output(release_candidate_list)) + | |
| 183 api.override_step_data( | |
| 184 'read results log file', | |
| 185 api.raw_io.output(test_results))) | |
| 186 | |
| 187 yield ( | |
| 188 api.test('%s_write_test_notes' % sanitize('Linux64 ChromeDriver')) + | |
| 189 api.properties.generic( | |
| 190 mastername='chromium.fyi', | |
| 191 buildername='Linux ChromeDriver Tests (dbg)', | |
| 192 slavename='slavename') + | |
| 193 api.properties( | |
| 194 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 195 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 196 got_revision_cp='refs/heads/master@{#333333}') + | |
| 197 api.platform('linux', 64) + | |
| 198 api.step_data('gsutil list chromedriver versions', retcode=1) + | |
| 199 api.step_data('gsutil list version notes', retcode=1) + | |
| 200 api.step_data('gsutil download prev notes', retcode=1)) | |
| 201 | |
| 202 yield ( | |
| 203 api.test('%s_update_test_notes' % sanitize('Linux64 ChromeDriver')) + | |
| 204 api.properties.generic( | |
| 205 mastername='chromium.fyi', | |
| 206 buildername='Linux ChromeDriver Tests (dbg)', | |
| 207 slavename='slavename') + | |
| 208 api.properties( | |
| 209 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 210 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 211 got_revision_cp='refs/heads/master@{#333333}') + | |
| 212 api.platform('linux', 64) + | |
| 213 api.step_data('gsutil list chromedriver versions', retcode=1) + | |
| 214 api.step_data('gsutil list version notes', retcode=1)) | |
| 215 | |
| 216 yield ( | |
| 217 api.test('%s_download_chrome_failure' % sanitize('Linux64 ChromeDriver')) + | |
| 218 api.properties.generic( | |
| 219 mastername='chromium.fyi', | |
| 220 buildername='Linux ChromeDriver Tests (dbg)', | |
| 221 slavename='slavename') + | |
| 222 api.properties( | |
| 223 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 224 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 225 got_revision_cp='refs/heads/master@{#333333}') + | |
| 226 api.platform('linux', 64) + | |
| 227 api.step_data('gsutil download chrome', retcode=1)) | |
| 228 | |
| 229 | |
| 230 yield ( | |
| 231 api.test('%s_is_latest_chromedriver' % sanitize('Linux64 ChromeDriver')) + | |
| 232 api.properties.generic( | |
| 233 mastername='chromium.fyi', | |
| 234 buildername='Linux ChromeDriver Tests (dbg)', | |
| 235 slavename='slavename') + | |
| 236 api.properties( | |
| 237 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 238 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 239 got_revision_cp='refs/heads/master@{#333333}') + | |
| 240 api.platform('linux', 64) + | |
| 241 api.step_data('gsutil list chromedriver versions', retcode=1) + | |
| 242 api.override_step_data( | |
| 243 'gsutil check latest release', api.raw_io.stream_output('9.99')) + | |
| 244 api.override_step_data( | |
| 245 'read version file', api.raw_io.output('9.99'))) | |
| 246 | |
| 247 yield ( | |
| 248 api.test('%s_infer_test_passing' % sanitize('Linux64 ChromeDriver')) + | |
| 249 api.properties.generic( | |
| 250 mastername='chromium.fyi', | |
| 251 buildername='Linux ChromeDriver Tests (dbg)', | |
| 252 slavename='slavename') + | |
| 253 api.properties( | |
| 254 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 255 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 256 got_revision_cp='refs/heads/master@{#333333}') + | |
| 257 api.platform('linux', 64) + | |
| 258 api.step_data('gsutil list chromedriver versions', retcode=1) + | |
| 259 api.override_step_data( | |
| 260 'gsutil list release candidates', | |
| 261 api.raw_io.stream_output( | |
| 262 'test/dir/chromedriver_linux64_9.99.333333.zip')) + | |
| 263 api.override_step_data( | |
| 264 'read results log file', | |
| 265 api.raw_io.output('{"222222": true, "444444": true}'))) | |
| 266 | |
| 267 yield ( | |
| 268 api.test('%s_test_failures' % sanitize('Linux64 ChromeDriver')) + | |
| 269 api.properties.generic( | |
| 270 mastername='chromium.fyi', | |
| 271 buildername='Linux ChromeDriver Tests (dbg)', | |
| 272 slavename='slavename') + | |
| 273 api.properties( | |
| 274 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 275 got_revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', | |
| 276 got_revision_cp='refs/heads/master@{#333333}') + | |
| 277 api.platform('linux', 64) + | |
| 278 api.step_data('java_tests(v444444)', retcode=1) + | |
| 279 api.step_data('chromedriver_tests', retcode=1)) | |
| 280 | |
| 281 yield ( | |
| 282 api.test('%s_test_failures' % sanitize('Android ChromeDriver')) + | |
| 283 api.properties.generic( | |
| 284 mastername='chromium.fyi', | |
| 285 buildername='Android ChromeDriver Tests (dbg)', | |
| 286 slavename='slavename') + | |
| 287 api.properties( | |
| 288 parent_build_archive_url='gs://test-domain/test-archive.zip', | |
| 289 got_revision_cp='refs/heads/master@{#333333}') + | |
| 290 api.step_data('java_tests(chrome_shell)', retcode=1)) | |
| OLD | NEW |