| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 'chromium', | 6 'chromium', |
| 7 'gclient', | 7 'gclient', |
| 8 'properties', | 8 'properties', |
| 9 'python', |
| 9 ] | 10 ] |
| 10 | 11 |
| 11 def GenSteps(api): | 12 def GenSteps(api): |
| 12 # TODO(iannucci): Make a standard way to specify configuration in the recipe | 13 # TODO(iannucci): Make a standard way to specify configuration in the recipe |
| 13 # inputs. Such a design should be able to accept modified | 14 # inputs. Such a design should be able to accept modified |
| 14 # config blobs as well (hopefully readably delta-encoded). | 15 # config blobs as well (hopefully readably delta-encoded). |
| 15 config_vals = {'GIT_MODE': True} | 16 config_vals = {'GIT_MODE': True} |
| 16 config_vals.update( | 17 config_vals.update( |
| 17 dict((str(k),v) for k,v in api.properties.iteritems() if k.isupper()) | 18 dict((str(k),v) for k,v in api.properties.iteritems() if k.isupper()) |
| 18 ) | 19 ) |
| 19 api.chromium.set_config('chromium', **config_vals) | 20 api.chromium.set_config('chromium', **config_vals) |
| 20 | 21 |
| 21 yield ( | 22 yield ( |
| 22 api.gclient.checkout(), | 23 api.gclient.checkout(), |
| 23 api.chromium.runhooks(), | 24 api.chromium.runhooks(), |
| 24 api.chromium.compile(), | 25 api.chromium.compile(), |
| 25 ) | 26 ) |
| 26 | 27 |
| 28 yield api.python.inline('last step', 'print "last step"') |
| 29 |
| 27 | 30 |
| 28 def GenTests(api): | 31 def GenTests(api): |
| 29 for plat in ('win', 'mac', 'linux'): | 32 for plat in ('win', 'mac', 'linux'): |
| 30 for bits in (32, 64): | 33 for bits in (32, 64): |
| 31 yield 'basic_%s_%s' % (plat, bits), { | 34 yield 'basic_%s_%s' % (plat, bits), { |
| 32 'mock': {'platform': {'name': plat}}, | 35 'mock': {'platform': {'name': plat}}, |
| 33 'properties': {'TARGET_BITS': bits}, | 36 'properties': {'TARGET_BITS': bits}, |
| 34 } | 37 } |
| 38 yield 'fail', { |
| 39 'step_mocks': { |
| 40 'compile': { |
| 41 '$R': 1 |
| 42 } |
| 43 } |
| 44 } |
| OLD | NEW |