OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2015 The Chromium Authors. All rights reserved. | 3 # Copyright 2015 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 | 7 |
8 '''Generate buildbot specs for all buildbots.''' | 8 '''Generate buildbot specs for all buildbots.''' |
9 | 9 |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 tmp_spec_file.name, bot]) | 146 tmp_spec_file.name, bot]) |
147 with open(tmp_spec_file.name) as f: | 147 with open(tmp_spec_file.name) as f: |
148 spec = json.load(f) | 148 spec = json.load(f) |
149 spec['dm_flags'] = ['--dummy-flags'] | 149 spec['dm_flags'] = ['--dummy-flags'] |
150 spec['nanobench_flags'] = ['--dummy-flags'] | 150 spec['nanobench_flags'] = ['--dummy-flags'] |
151 specs[bot] = spec | 151 specs[bot] = spec |
152 finally: | 152 finally: |
153 os.remove(tmp_spec_file.name) | 153 os.remove(tmp_spec_file.name) |
154 | 154 |
155 out = os.path.join( | 155 out = os.path.join( |
156 SKIA_DIR, 'infra', 'bots', 'recipe_modules', 'skia', 'fake_specs.py') | 156 SKIA_DIR, 'infra', 'bots', 'recipe_modules', 'core', 'fake_specs.py') |
157 | 157 |
158 with open(out, 'w') as f: | 158 with open(out, 'w') as f: |
159 f.write('''# Copyright 2016 The Chromium Authors. All rights reserved. | 159 f.write('''# Copyright 2016 The Chromium Authors. All rights reserved. |
160 # Use of this source code is governed by a BSD-style license that can be | 160 # Use of this source code is governed by a BSD-style license that can be |
161 # found in the LICENSE file. | 161 # found in the LICENSE file. |
162 | 162 |
163 # This file is generated by the %s script. | 163 # This file is generated by the %s script. |
164 | 164 |
165 FAKE_SPECS = ''' % sys.argv[0]) | 165 FAKE_SPECS = ''' % sys.argv[0]) |
166 prettier_print(specs, indent=2, stream=f) | 166 prettier_print(specs, indent=2, stream=f) |
167 | 167 |
168 print 'Wrote output to %s' % out | 168 print 'Wrote output to %s' % out |
169 | 169 |
170 | 170 |
171 if __name__ == '__main__': | 171 if __name__ == '__main__': |
172 main() | 172 main() |
OLD | NEW |