OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 DEPS = [ | 5 DEPS = [ |
6 'depot_tools/bot_update', | 6 'depot_tools/bot_update', |
| 7 'depot_tools/infra_paths', |
7 'chromium', | 8 'chromium', |
8 'depot_tools/gclient', | 9 'depot_tools/gclient', |
9 'recipe_engine/path', | 10 'recipe_engine/path', |
10 'recipe_engine/properties', | 11 'recipe_engine/properties', |
11 'recipe_engine/python', | 12 'recipe_engine/python', |
12 'recipe_engine/raw_io', | 13 'recipe_engine/raw_io', |
13 'recipe_engine/step', | 14 'recipe_engine/step', |
14 'v8', | 15 'v8', |
15 ] | 16 ] |
16 | 17 |
17 def RunSteps(api): | 18 def RunSteps(api): |
18 api.chromium.cleanup_temp() | 19 api.chromium.cleanup_temp() |
19 api.gclient.set_config('v8') | 20 api.gclient.set_config('v8') |
20 api.bot_update.ensure_checkout(force=True, no_shallow=True) | 21 api.bot_update.ensure_checkout(force=True, no_shallow=True) |
21 | 22 |
22 step_result = api.python( | 23 step_result = api.python( |
23 'check roll status', | 24 'check roll status', |
24 api.path['build'].join('scripts', 'tools', 'runit.py'), | 25 api.infra_paths['build'].join('scripts', 'tools', 'runit.py'), |
25 [api.path['build'].join('scripts', 'tools', 'pycurl.py'), | 26 [api.infra_paths['build'].join('scripts', 'tools', 'pycurl.py'), |
26 'https://v8-roll.appspot.com/status'], | 27 'https://v8-roll.appspot.com/status'], |
27 stdout=api.raw_io.output(), | 28 stdout=api.raw_io.output(), |
28 step_test_data=lambda: api.raw_io.test_api.stream_output( | 29 step_test_data=lambda: api.raw_io.test_api.stream_output( |
29 '1', stream='stdout') | 30 '1', stream='stdout') |
30 ) | 31 ) |
31 step_result.presentation.logs['stdout'] = step_result.stdout.splitlines() | 32 step_result.presentation.logs['stdout'] = step_result.stdout.splitlines() |
32 if step_result.stdout.strip() != '1': | 33 if step_result.stdout.strip() != '1': |
33 step_result.presentation.step_text = "Pushing deactivated" | 34 step_result.presentation.step_text = "Pushing deactivated" |
34 return | 35 return |
35 else: | 36 else: |
36 step_result.presentation.step_text = "Pushing activated" | 37 step_result.presentation.step_text = "Pushing activated" |
37 | 38 |
38 api.python( | 39 api.python( |
39 'push candidate', | 40 'push candidate', |
40 api.path['checkout'].join( | 41 api.path['checkout'].join( |
41 'tools', 'release', 'auto_push.py'), | 42 'tools', 'release', 'auto_push.py'), |
42 ['--author', 'v8-autoroll@chromium.org', | 43 ['--author', 'v8-autoroll@chromium.org', |
43 '--reviewer', 'v8-autoroll@chromium.org', | 44 '--reviewer', 'v8-autoroll@chromium.org', |
44 '--push', | 45 '--push', |
45 '--work-dir', api.path['slave_build'].join('workdir')], | 46 '--work-dir', api.infra_paths['slave_build'].join('workdir')], |
46 cwd=api.path['checkout'], | 47 cwd=api.path['checkout'], |
47 ) | 48 ) |
48 | 49 |
49 | 50 |
50 def GenTests(api): | 51 def GenTests(api): |
51 yield api.test('standard') + api.properties.generic( | 52 yield api.test('standard') + api.properties.generic( |
52 mastername='client.v8.fyi') | 53 mastername='client.v8.fyi') |
53 yield (api.test('rolling_deactivated') + | 54 yield (api.test('rolling_deactivated') + |
54 api.properties.generic(mastername='client.v8.fyi') + | 55 api.properties.generic(mastername='client.v8.fyi') + |
55 api.override_step_data( | 56 api.override_step_data( |
56 'check roll status', api.raw_io.stream_output('0', stream='stdout')) | 57 'check roll status', api.raw_io.stream_output('0', stream='stdout')) |
57 ) | 58 ) |
58 | 59 |
OLD | NEW |