| OLD | NEW |
| 1 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2015 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 """Generates new baselines for Blink layout tests that need rebaselining. | 5 """Generates new baselines for Blink layout tests that need rebaselining. |
| 6 | 6 |
| 7 Intended to be called periodically. Syncs to the Blink repo and runs | 7 Intended to be called periodically. Syncs to the Blink repo and runs |
| 8 'webkit-patch auto-rebaseline', which processes entries in | 8 'webkit-patch auto-rebaseline', which processes entries in |
| 9 LayoutTests/TestExpectations that are marked with 'NeedsRebaseline'. | 9 LayoutTests/TestExpectations that are marked with 'NeedsRebaseline'. |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 | 24 |
| 25 def RunSteps(api): | 25 def RunSteps(api): |
| 26 RIETVELD_REFRESH_TOKEN = '/creds/refresh_tokens/blink_rebaseline_bot_rietveld' | 26 RIETVELD_REFRESH_TOKEN = '/creds/refresh_tokens/blink_rebaseline_bot_rietveld' |
| 27 | 27 |
| 28 api.gclient.set_config('chromium') | 28 api.gclient.set_config('chromium') |
| 29 api.bot_update.ensure_checkout(force=True) | 29 api.bot_update.ensure_checkout(force=True) |
| 30 | 30 |
| 31 cwd = api.path['checkout'].join('third_party', 'WebKit') | 31 cwd = api.path['checkout'].join('third_party', 'WebKit') |
| 32 | 32 |
| 33 # Changes should be committed and landed as the rebaseline bot role account. |
| 34 api.git('config', 'user.name', 'Rebaseline Bot') |
| 35 api.git('config', 'user.email', 'blink-rebaseline-bot@chromium.org') |
| 36 |
| 33 api.python('webkit-patch auto-rebaseline', | 37 api.python('webkit-patch auto-rebaseline', |
| 34 cwd.join('Tools', 'Scripts', 'webkit-patch'), | 38 cwd.join('Tools', 'Scripts', 'webkit-patch'), |
| 35 ['auto-rebaseline', '--verbose', | 39 ['auto-rebaseline', '--verbose', |
| 36 '--auth-refresh-token-json', RIETVELD_REFRESH_TOKEN, | 40 '--auth-refresh-token-json', RIETVELD_REFRESH_TOKEN], |
| 37 '--commit-author', | |
| 38 'Rebaseline Bot <blink-rebaseline-bot@chromium.org>'], | |
| 39 cwd=cwd) | 41 cwd=cwd) |
| 40 | 42 |
| 41 | 43 |
| 42 def GenTests(api): | 44 def GenTests(api): |
| 43 yield (api.test('rebaseline_o_matic') + | 45 yield (api.test('rebaseline_o_matic') + |
| 44 api.properties(mastername='chromium.infra.cron', | 46 api.properties(mastername='chromium.infra.cron', |
| 45 buildername='rebaseline-o-matic', | 47 buildername='rebaseline-o-matic', |
| 46 slavename='fake-slave')) | 48 slavename='fake-slave')) |
| 47 | 49 |
| OLD | NEW |