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

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

Issue 1101673005: Extract functions from path recipe module so that step can depend on it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
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 'file',
6 'isolate', 7 'isolate',
7 'path', 8 'path',
8 'properties', 9 'properties',
9 'python', 10 'python',
10 'raw_io', 11 'raw_io',
11 'step', 12 'step',
12 'swarming', 13 'swarming',
13 'swarming_client', 14 'swarming_client',
14 ] 15 ]
15 16
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 # Wait for all tasks to complete. 95 # Wait for all tasks to complete.
95 for task in tasks: 96 for task in tasks:
96 step_result = api.swarming.collect_task(task) 97 step_result = api.swarming.collect_task(task)
97 state = step_result.json.output['shards'][0]['state'] 98 state = step_result.json.output['shards'][0]['state']
98 assert api.swarming.State.COMPLETED == state, state 99 assert api.swarming.State.COMPLETED == state, state
99 state_name = api.swarming.State.to_string(state) 100 state_name = api.swarming.State.to_string(state)
100 assert 'Completed' == state_name, state_name 101 assert 'Completed' == state_name, state_name
101 assert step_result.swarming_task in tasks 102 assert step_result.swarming_task in tasks
102 103
103 # Cleanup. 104 # Cleanup.
104 api.path.rmtree('remove temp dir', temp_dir) 105 api.file.rmtree('remove temp dir', temp_dir)
105 106
106 107
107 def GenTests(api): 108 def GenTests(api):
108 yield ( 109 yield (
109 api.test('basic_0.4') + 110 api.test('basic_0.4') +
110 api.step_data( 111 api.step_data(
111 'archive for win', 112 'archive for win',
112 stdout=api.raw_io.output('hash_for_win hello_world.isolated')) + 113 stdout=api.raw_io.output('hash_for_win hello_world.isolated')) +
113 api.step_data( 114 api.step_data(
114 'archive for linux', 115 'archive for linux',
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 stdout=api.raw_io.output('hash_for_linux hello_world.isolated')) + 164 stdout=api.raw_io.output('hash_for_linux hello_world.isolated')) +
164 api.step_data( 165 api.step_data(
165 'archive for mac', 166 'archive for mac',
166 stdout=api.raw_io.output('hash_for_mac hello_world.isolated')) + 167 stdout=api.raw_io.output('hash_for_mac hello_world.isolated')) +
167 api.properties( 168 api.properties(
168 rietveld="https://codereview.chromium.org", 169 rietveld="https://codereview.chromium.org",
169 issue="123", 170 issue="123",
170 patchset="1001", 171 patchset="1001",
171 simulated_version=(0, 5), 172 simulated_version=(0, 5),
172 show_isolated_out_in_collect_step=False)) 173 show_isolated_out_in_collect_step=False))
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/skia/default_flavor.py ('k') | scripts/slave/recipe_modules/syzygy/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698