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 DEPS = [ | 5 DEPS = [ |
| 6 'chromium', | 6 'chromium', |
| 7 'filter', | 7 'filter', |
| 8 'json', | 8 'json', |
| 9 'path', | 9 'path', |
| 10 'properties', | 10 'properties', |
| 11 'raw_io', | 11 'raw_io', |
| 12 ] | 12 ] |
| 13 | 13 |
| 14 def GenSteps(api): | 14 def GenSteps(api): |
| 15 api.path['checkout'] = api.path['slave_build'] | 15 api.path['checkout'] = api.path['slave_build'] |
| 16 api.chromium.set_config('chromium') | 16 api.chromium.set_config('chromium') |
| 17 api.filter.does_patch_require_compile() | 17 api.filter.does_patch_require_compile() |
| 18 assert (api.filter.result and api.properties['example_result']) or \ | 18 assert (api.filter.result and api.properties['example_result']) or \ |
| 19 (not api.filter.result and not api.properties['example_result']) | 19 (not api.filter.result and not api.properties['example_result']) |
| 20 assert (not api.properties['example_matching_exes'] or | 20 assert (not api.properties['example_matching_exes'] or |
| 21 list(api.properties['example_matching_exes']) == | 21 list(api.properties['example_matching_exes']) == |
| 22 api.filter.matching_exes) | 22 api.filter.matching_exes) |
|
iannucci
2014/08/07 23:43:28
could we add a bogus step afterwards to show that
| |
| 23 | 23 |
| 24 def GenTests(api): | 24 def GenTests(api): |
| 25 # Trivial test with no exclusions and nothing matching. | 25 # Trivial test with no exclusions and nothing matching. |
| 26 yield (api.test('basic') + | 26 yield (api.test('basic') + |
| 27 api.properties(filter_exclusions=[]) + | 27 api.properties(filter_exclusions=[]) + |
| 28 api.properties(example_result=None) + | 28 api.properties(example_result=None) + |
| 29 api.properties(example_matching_exes=None) + | 29 api.properties(example_matching_exes=None) + |
| 30 api.override_step_data( | 30 api.override_step_data( |
| 31 'git diff to analyze patch', | 31 'git diff to analyze patch', |
| 32 api.raw_io.stream_output('yy'))) | 32 api.raw_io.stream_output('yy'))) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 'targets': ['foo']}))) | 69 'targets': ['foo']}))) |
| 70 | 70 |
| 71 # Analyze with error condition. | 71 # Analyze with error condition. |
| 72 yield (api.test('analyzes_error') + | 72 yield (api.test('analyzes_error') + |
| 73 api.properties(matching_exes=None) + | 73 api.properties(matching_exes=None) + |
| 74 api.properties(example_matching_exes=None) + | 74 api.properties(example_matching_exes=None) + |
| 75 api.properties(example_result=1) + | 75 api.properties(example_result=1) + |
| 76 api.override_step_data( | 76 api.override_step_data( |
| 77 'analyze', | 77 'analyze', |
| 78 api.json.output({'error': 'ERROR'}))) | 78 api.json.output({'error': 'ERROR'}))) |
| 79 | |
| 80 # Analyze with python returning bad status. | |
| 81 yield (api.test('bad_retcode_doesnt_fail') + | |
| 82 api.properties(matching_exes=None) + | |
| 83 api.properties(example_matching_exes=None) + | |
| 84 api.properties(example_result=1) + | |
| 85 api.step_data( | |
| 86 'analyze', | |
| 87 retcode=-1)) | |
| OLD | NEW |