| 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 """Buildbot recipe definition for the various Crashpad continuous builders. | 5 """Buildbot recipe definition for the various Crashpad continuous builders. |
| 6 """ | 6 """ |
| 7 | 7 |
| 8 DEPS = [ | 8 DEPS = [ |
| 9 'file', |
| 9 'gclient', | 10 'gclient', |
| 10 'path', | 11 'path', |
| 11 'platform', | 12 'platform', |
| 12 'properties', | 13 'properties', |
| 13 'python', | 14 'python', |
| 14 'step', | 15 'step', |
| 15 ] | 16 ] |
| 16 | 17 |
| 17 | 18 |
| 18 def GenSteps(api): | 19 def GenSteps(api): |
| 19 """Generates the sequence of steps that will be run by the slave.""" | 20 """Generates the sequence of steps that will be run by the slave.""" |
| 20 api.gclient.set_config('crashpad') | 21 api.gclient.set_config('crashpad') |
| 21 api.gclient.checkout() | 22 api.gclient.checkout() |
| 22 | 23 |
| 23 if 'clobber' in api.properties: | 24 if 'clobber' in api.properties: |
| 24 api.path.rmtree('out', api.path['checkout'].join('out')) | 25 api.file.rmtree('out', api.path['checkout'].join('out')) |
| 25 | 26 |
| 26 api.gclient.runhooks() | 27 api.gclient.runhooks() |
| 27 | 28 |
| 28 buildername = api.properties['buildername'] | 29 buildername = api.properties['buildername'] |
| 29 dirname = 'Debug' if '_dbg' in buildername else 'Release' | 30 dirname = 'Debug' if '_dbg' in buildername else 'Release' |
| 30 path = api.path['checkout'].join('out', dirname) | 31 path = api.path['checkout'].join('out', dirname) |
| 31 api.step('compile with ninja', ['ninja', '-C', path]) | 32 api.step('compile with ninja', ['ninja', '-C', path]) |
| 32 api.python('run tests', | 33 api.python('run tests', |
| 33 api.path['checkout'].join('build', 'run_tests.py'), | 34 api.path['checkout'].join('build', 'run_tests.py'), |
| 34 args=[dirname]) | 35 args=[dirname]) |
| 35 | 36 |
| 36 | 37 |
| 37 def GenTests(api): | 38 def GenTests(api): |
| 38 tests = [ | 39 tests = [ |
| 39 'crashpad_mac_dbg', | 40 'crashpad_mac_dbg', |
| 40 'crashpad_mac_rel', | 41 'crashpad_mac_rel', |
| 41 'crashpad_win_dbg', | 42 'crashpad_win_dbg', |
| 42 'crashpad_win_rel', | 43 'crashpad_win_rel', |
| 43 ] | 44 ] |
| 44 for t in tests: | 45 for t in tests: |
| 45 yield(api.test(t) + api.properties.generic(buildername=t)) | 46 yield(api.test(t) + api.properties.generic(buildername=t)) |
| 46 yield(api.test(t + '_clobber') + | 47 yield(api.test(t + '_clobber') + |
| 47 api.properties.generic(buildername=t, clobber=True)) | 48 api.properties.generic(buildername=t, clobber=True)) |
| OLD | NEW |