OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 for Skia Infra. | 6 # Recipe for Skia Infra. |
7 | 7 |
8 | 8 |
9 import re | 9 import re |
10 | 10 |
11 | 11 |
12 DEPS = [ | 12 DEPS = [ |
| 13 'depot_tools/infra_paths', |
13 'file', | 14 'file', |
14 'recipe_engine/path', | 15 'recipe_engine/path', |
15 'recipe_engine/platform', | 16 'recipe_engine/platform', |
16 'recipe_engine/properties', | 17 'recipe_engine/properties', |
17 'recipe_engine/python', | 18 'recipe_engine/python', |
18 'recipe_engine/raw_io', | 19 'recipe_engine/raw_io', |
19 'depot_tools/rietveld', | 20 'depot_tools/rietveld', |
20 'recipe_engine/step', | 21 'recipe_engine/step', |
21 ] | 22 ] |
22 | 23 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 api.path['checkout'] = dest | 56 api.path['checkout'] = dest |
56 | 57 |
57 # Maybe apply a patch. | 58 # Maybe apply a patch. |
58 if (api.properties.get('rietveld') and | 59 if (api.properties.get('rietveld') and |
59 api.properties.get('issue') and | 60 api.properties.get('issue') and |
60 api.properties.get('patchset')): | 61 api.properties.get('patchset')): |
61 api.rietveld.apply_issue() | 62 api.rietveld.apply_issue() |
62 | 63 |
63 | 64 |
64 def RunSteps(api): | 65 def RunSteps(api): |
65 go_dir = api.path['slave_build'].join('go') | 66 go_dir = api.infra_paths['slave_build'].join('go') |
66 go_src = go_dir.join('src') | 67 go_src = go_dir.join('src') |
67 api.file.makedirs('makedirs go/src', go_src) | 68 api.file.makedirs('makedirs go/src', go_src) |
68 infra_dir = go_src.join(INFRA_GO) | 69 infra_dir = go_src.join(INFRA_GO) |
69 | 70 |
70 # Check out the infra repo. | 71 # Check out the infra repo. |
71 git_checkout( | 72 git_checkout( |
72 api, | 73 api, |
73 INFRA_GIT_URL, | 74 INFRA_GIT_URL, |
74 dest=infra_dir, | 75 dest=infra_dir, |
75 ref=api.properties.get('revision', 'origin/master')) | 76 ref=api.properties.get('revision', 'origin/master')) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 karma_port = '9876' | 119 karma_port = '9876' |
119 if m and len(m.groups()) > 0: | 120 if m and len(m.groups()) > 0: |
120 karma_port = '15%s' % m.groups()[0] | 121 karma_port = '15%s' % m.groups()[0] |
121 env['KARMA_PORT'] = karma_port | 122 env['KARMA_PORT'] = karma_port |
122 api.python('run_unittests', 'run_unittests', cwd=infra_dir, env=env) | 123 api.python('run_unittests', 'run_unittests', cwd=infra_dir, env=env) |
123 | 124 |
124 | 125 |
125 def GenTests(api): | 126 def GenTests(api): |
126 yield ( | 127 yield ( |
127 api.test('Infra-PerCommit') + | 128 api.test('Infra-PerCommit') + |
128 api.path.exists(api.path['slave_build'].join('go', 'src', INFRA_GO, | 129 api.infra_paths.exists( |
129 '.git')) + | 130 api.infra_paths['slave_build'].join('go', 'src', INFRA_GO, '.git')) + |
130 api.properties(slavename='skiabot-linux-infra-001') | 131 api.properties(slavename='skiabot-linux-infra-001') |
131 ) | 132 ) |
132 yield ( | 133 yield ( |
133 api.test('Infra-PerCommit_initialcheckout') + | 134 api.test('Infra-PerCommit_initialcheckout') + |
134 api.properties(slavename='skiabot-linux-infra-001') | 135 api.properties(slavename='skiabot-linux-infra-001') |
135 ) | 136 ) |
136 yield ( | 137 yield ( |
137 api.test('Infra-PerCommit_try') + | 138 api.test('Infra-PerCommit_try') + |
138 api.properties(rietveld='https://codereview.chromium.org', | 139 api.properties(rietveld='https://codereview.chromium.org', |
139 issue=1234, | 140 issue=1234, |
140 patchset=1, | 141 patchset=1, |
141 revision=REF_HEAD, | 142 revision=REF_HEAD, |
142 slavename='skiabot-linux-infra-001') | 143 slavename='skiabot-linux-infra-001') |
143 ) | 144 ) |
OLD | NEW |