Chromium Code Reviews| 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 | 5 |
| 6 # Recipe for the Skia PerCommit Housekeeper. | 6 # Recipe for the Skia PerCommit Housekeeper. |
| 7 | 7 |
| 8 import os.path | |
|
rmistry
2016/08/12 15:14:39
Not used?
jcgregorio
2016/08/12 15:20:38
Fixed.
| |
| 8 | 9 |
| 9 DEPS = [ | 10 DEPS = [ |
| 10 'core', | 11 'core', |
| 11 'recipe_engine/path', | 12 'recipe_engine/path', |
| 12 'recipe_engine/properties', | 13 'recipe_engine/properties', |
| 13 'recipe_engine/python', | 14 'recipe_engine/python', |
| 14 'recipe_engine/step', | 15 'recipe_engine/step', |
| 15 'run', | 16 'run', |
| 16 'vars', | 17 'vars', |
| 17 ] | 18 ] |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 '--gsutil_path', gsutil_path] | 62 '--gsutil_path', gsutil_path] |
| 62 if api.vars.is_trybot: | 63 if api.vars.is_trybot: |
| 63 cmd.extend(['--issue_number', str(api.properties['issue'])]) | 64 cmd.extend(['--issue_number', str(api.properties['issue'])]) |
| 64 api.run( | 65 api.run( |
| 65 api.step, | 66 api.step, |
| 66 'generate and upload binary size data', | 67 'generate and upload binary size data', |
| 67 cmd=cmd, | 68 cmd=cmd, |
| 68 cwd=cwd, | 69 cwd=cwd, |
| 69 abort_on_failure=False) | 70 abort_on_failure=False) |
| 70 | 71 |
| 72 env = {} | |
| 73 env['GOPATH'] = api.vars.tmp_dir.join('golib') | |
| 74 extractexe = env['GOPATH'].join('bin', 'extract_comments') | |
| 75 goexe = api.vars.slave_dir.join('go', 'go', 'bin', 'go') | |
|
rmistry
2016/08/12 15:14:39
So many 'go's here :)
jcgregorio
2016/08/12 15:20:38
Yeah, I think I could fiddle with the cipd packagi
| |
| 76 | |
| 77 # Compile extract_comments. | |
| 78 api.run( | |
| 79 api.step, | |
| 80 'compile extract_comments', | |
| 81 cmd=[goexe, 'get', 'go.skia.org/infra/comments/go/extract_comments'], | |
| 82 cwd=cwd, | |
| 83 env=env, | |
| 84 abort_on_failure=True) | |
| 85 | |
| 86 # Run extract_comments on the gm directory. | |
| 87 api.run( | |
| 88 api.step, | |
| 89 'run extract_comments', | |
| 90 cmd=[extractexe, '--dir', 'gm', '--dest', 'gs://skia-doc/gm/comments.json'], | |
| 91 cwd=cwd, | |
| 92 env=env, | |
| 93 abort_on_failure=True) | |
| 94 | |
| 95 | |
| 71 def GenTests(api): | 96 def GenTests(api): |
| 72 for mastername, slaves in TEST_BUILDERS.iteritems(): | 97 for mastername, slaves in TEST_BUILDERS.iteritems(): |
| 73 for slavename, builders_by_slave in slaves.iteritems(): | 98 for slavename, builders_by_slave in slaves.iteritems(): |
| 74 for buildername in builders_by_slave: | 99 for buildername in builders_by_slave: |
| 75 test = ( | 100 test = ( |
| 76 api.test(buildername) + | 101 api.test(buildername) + |
| 77 api.properties(buildername=buildername, | 102 api.properties(buildername=buildername, |
| 78 mastername=mastername, | 103 mastername=mastername, |
| 79 slavename=slavename, | 104 slavename=slavename, |
| 80 buildnumber=5, | 105 buildnumber=5, |
| 81 revision='abc123', | 106 revision='abc123', |
| 82 path_config='kitchen', | 107 path_config='kitchen', |
| 83 swarm_out_dir='[SWARM_OUT_DIR]') + | 108 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 84 api.path.exists(api.path['slave_build']) | 109 api.path.exists(api.path['slave_build']) |
| 85 ) | 110 ) |
| 86 if 'Trybot' in buildername: | 111 if 'Trybot' in buildername: |
| 87 test.properties['issue'] = '500' | 112 test.properties['issue'] = '500' |
| 88 test.properties['patchset'] = '1' | 113 test.properties['patchset'] = '1' |
| 89 test.properties['rietveld'] = 'https://codereview.chromium.org' | 114 test.properties['rietveld'] = 'https://codereview.chromium.org' |
| 90 yield test | 115 yield test |
| OLD | NEW |