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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/tryserver/example.py
diff --git a/recipe_modules/tryserver/example.py b/recipe_modules/tryserver/example.py
index c1bddc461daf231a8f2fe7ef68fa6d7c0fd19eb9..96b9e0bfa7bf584a489168d1033ff92b2f429785 100644
--- a/recipe_modules/tryserver/example.py
+++ b/recipe_modules/tryserver/example.py
@@ -3,17 +3,30 @@
# found in the LICENSE file.
DEPS = [
+ 'recipe_engine/json',
+ 'recipe_engine/raw_io',
'recipe_engine/path',
'recipe_engine/platform',
'recipe_engine/properties',
'recipe_engine/python',
+ 'recipe_engine/step',
'tryserver',
]
def RunSteps(api):
api.path['checkout'] = api.path['slave_build']
+ if api.properties.get('patch_text'):
+ api.step('patch_text test', [
+ 'echo', str(api.tryserver.get_footers(api.properties['patch_text']))])
+ api.step('patch_text test', [
+ 'echo', str(api.tryserver.get_footer(
+ 'Foo', api.properties['patch_text']))])
+ return
+
api.tryserver.maybe_apply_issue()
+ if api.tryserver.can_apply_issue:
+ api.tryserver.get_footers()
api.tryserver.get_files_affected_by_patch(
api.properties.get('test_patch_root'))
@@ -30,6 +43,8 @@ def RunSteps(api):
def GenTests(api):
+ description_step = api.override_step_data(
+ 'git_cl description', stdout=api.raw_io.output('foobar'))
yield (api.test('with_svn_patch') +
api.properties(patch_url='svn://checkout.url'))
@@ -41,13 +56,27 @@ def GenTests(api):
patch_ref='johndoe#123.diff'))
yield (api.test('with_rietveld_patch') +
- api.properties.tryserver())
+ api.properties.tryserver() +
+ description_step)
yield (api.test('with_wrong_patch') + api.platform('win', 32))
-
yield (api.test('with_rietveld_patch_new') +
- api.properties.tryserver(test_patch_root='sub/project'))
+ api.properties.tryserver(test_patch_root='sub/project') +
+ description_step)
yield (api.test('with_wrong_patch_new') + api.platform('win', 32) +
api.properties(test_patch_root='sub\\project'))
+
+ yield (api.test('basic_tags') +
+ api.properties(
+ patch_text='hihihi\nfoo:bar\nbam:baz',
+ footer='foo'
+ ) +
+ api.step_data(
+ 'parse description',
+ api.json.output({'Foo': ['bar']})) +
+ api.step_data(
+ 'parse description (2)',
+ api.json.output({'Foo': ['bar']}))
+ )
« 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