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

Side by Side Diff: recipe_modules/tryserver/example.py

Issue 1915833003: tryserver recipe_module: Add get_tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Minor things. Created 4 years, 7 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 'recipe_engine/json',
7 'recipe_engine/raw_io',
6 'recipe_engine/path', 8 'recipe_engine/path',
7 'recipe_engine/platform', 9 'recipe_engine/platform',
8 'recipe_engine/properties', 10 'recipe_engine/properties',
9 'recipe_engine/python', 11 'recipe_engine/python',
12 'recipe_engine/step',
10 'tryserver', 13 'tryserver',
11 ] 14 ]
12 15
13 16
14 def RunSteps(api): 17 def RunSteps(api):
15 api.path['checkout'] = api.path['slave_build'] 18 api.path['checkout'] = api.path['slave_build']
19 if api.properties.get('patch_text'):
20 api.step('patch_text test', [
21 'echo', str(api.tryserver.get_footers(api.properties['patch_text']))])
22 api.step('patch_text test', [
23 'echo', str(api.tryserver.get_footer(
24 'Foo', api.properties['patch_text']))])
25 return
26
16 api.tryserver.maybe_apply_issue() 27 api.tryserver.maybe_apply_issue()
28 if api.tryserver.can_apply_issue:
29 api.tryserver.get_footers()
17 api.tryserver.get_files_affected_by_patch( 30 api.tryserver.get_files_affected_by_patch(
18 api.properties.get('test_patch_root')) 31 api.properties.get('test_patch_root'))
19 32
20 if api.tryserver.is_tryserver: 33 if api.tryserver.is_tryserver:
21 api.tryserver.set_subproject_tag('v8') 34 api.tryserver.set_subproject_tag('v8')
22 35
23 api.tryserver.set_patch_failure_tryjob_result() 36 api.tryserver.set_patch_failure_tryjob_result()
24 api.tryserver.set_compile_failure_tryjob_result() 37 api.tryserver.set_compile_failure_tryjob_result()
25 api.tryserver.set_test_failure_tryjob_result() 38 api.tryserver.set_test_failure_tryjob_result()
26 api.tryserver.set_invalid_test_results_tryjob_result() 39 api.tryserver.set_invalid_test_results_tryjob_result()
27 40
28 with api.tryserver.set_failure_hash(): 41 with api.tryserver.set_failure_hash():
29 api.python.failing_step('fail', 'foo') 42 api.python.failing_step('fail', 'foo')
30 43
31 44
32 def GenTests(api): 45 def GenTests(api):
46 description_step = api.override_step_data(
47 'git_cl description', stdout=api.raw_io.output('foobar'))
33 yield (api.test('with_svn_patch') + 48 yield (api.test('with_svn_patch') +
34 api.properties(patch_url='svn://checkout.url')) 49 api.properties(patch_url='svn://checkout.url'))
35 50
36 yield (api.test('with_git_patch') + 51 yield (api.test('with_git_patch') +
37 api.properties( 52 api.properties(
38 patch_storage='git', 53 patch_storage='git',
39 patch_project='v8', 54 patch_project='v8',
40 patch_repo_url='http://patch.url/', 55 patch_repo_url='http://patch.url/',
41 patch_ref='johndoe#123.diff')) 56 patch_ref='johndoe#123.diff'))
42 57
43 yield (api.test('with_rietveld_patch') + 58 yield (api.test('with_rietveld_patch') +
44 api.properties.tryserver()) 59 api.properties.tryserver() +
60 description_step)
45 61
46 yield (api.test('with_wrong_patch') + api.platform('win', 32)) 62 yield (api.test('with_wrong_patch') + api.platform('win', 32))
47 63
48
49 yield (api.test('with_rietveld_patch_new') + 64 yield (api.test('with_rietveld_patch_new') +
50 api.properties.tryserver(test_patch_root='sub/project')) 65 api.properties.tryserver(test_patch_root='sub/project') +
66 description_step)
51 67
52 yield (api.test('with_wrong_patch_new') + api.platform('win', 32) + 68 yield (api.test('with_wrong_patch_new') + api.platform('win', 32) +
53 api.properties(test_patch_root='sub\\project')) 69 api.properties(test_patch_root='sub\\project'))
70
71 yield (api.test('basic_tags') +
72 api.properties(
73 patch_text='hihihi\nfoo:bar\nbam:baz',
74 footer='foo'
75 ) +
76 api.step_data(
77 'parse description',
78 api.json.output({'Foo': ['bar']})) +
79 api.step_data(
80 'parse description (2)',
81 api.json.output({'Foo': ['bar']}))
82 )
OLDNEW
« no previous file with comments | « recipe_modules/tryserver/api.py ('k') | recipe_modules/tryserver/example.expected/basic_tags.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698