Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2063)

Side by Side Diff: scripts/slave/recipe_modules/filter/example.py

Issue 473313002: Adds handling of 'Found dependency (all)' to filter (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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',
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 # Analyze returns matching result. 54 # Analyze returns matching result.
55 yield (api.test('analyzes_returns_true') + 55 yield (api.test('analyzes_returns_true') +
56 api.properties(example_result=1) + 56 api.properties(example_result=1) +
57 api.properties(example_matching_exes=None) + 57 api.properties(example_matching_exes=None) +
58 api.override_step_data( 58 api.override_step_data(
59 'analyze', 59 'analyze',
60 api.json.output({'status': 'Found dependency', 60 api.json.output({'status': 'Found dependency',
61 'targets': []}))) 61 'targets': []})))
62 62
63 # Analyze returns matching tests. 63 # Analyze returns matching tests while matching all.
64 yield (api.test('analyzes_matches_all_exes') +
65 api.properties(matching_exes=['foo', 'bar']) +
66 api.properties(example_matching_exes=['foo']) +
67 api.properties(example_result=1) +
68 api.override_step_data(
69 'analyze',
70 api.json.output({'status': 'Found dependency (all)',
71 'targets': ['foo']})))
72
73 # Analyze matches all and returns matching tests.
64 yield (api.test('analyzes_matches_exes') + 74 yield (api.test('analyzes_matches_exes') +
65 api.properties(matching_exes=['foo', 'bar']) + 75 api.properties(matching_exes=['foo', 'bar']) +
66 api.properties(example_matching_exes=['foo']) + 76 api.properties(example_matching_exes=['foo']) +
67 api.properties(example_result=1) + 77 api.properties(example_result=1) +
68 api.override_step_data( 78 api.override_step_data(
69 'analyze', 79 'analyze',
70 api.json.output({'status': 'Found dependency', 80 api.json.output({'status': 'Found dependency',
71 'targets': ['foo']}))) 81 'targets': ['foo']})))
72 82
73 # Analyze with error condition. 83 # Analyze with error condition.
74 yield (api.test('analyzes_error') + 84 yield (api.test('analyzes_error') +
75 api.properties(matching_exes=None) + 85 api.properties(matching_exes=None) +
76 api.properties(example_matching_exes=None) + 86 api.properties(example_matching_exes=None) +
77 api.properties(example_result=1) + 87 api.properties(example_result=1) +
78 api.override_step_data( 88 api.override_step_data(
79 'analyze', 89 'analyze',
80 api.json.output({'error': 'ERROR'}))) 90 api.json.output({'error': 'ERROR'})))
81 91
82 # Analyze with python returning bad status. 92 # Analyze with python returning bad status.
83 yield (api.test('bad_retcode_doesnt_fail') + 93 yield (api.test('bad_retcode_doesnt_fail') +
84 api.properties(matching_exes=None) + 94 api.properties(matching_exes=None) +
85 api.properties(example_matching_exes=None) + 95 api.properties(example_matching_exes=None) +
86 api.properties(example_result=1) + 96 api.properties(example_result=1) +
87 api.step_data( 97 api.step_data(
88 'analyze', 98 'analyze',
89 retcode=-1)) 99 retcode=-1))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698