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

Unified Diff: recipe_modules/bot_update/example.py

Issue 2249983004: Add apply_gerrit_ref to bot_update api (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: disable=relative-import Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_modules/bot_update/api.py ('k') | recipe_modules/bot_update/example.expected/apply_gerrit_ref.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/bot_update/example.py
diff --git a/recipe_modules/bot_update/example.py b/recipe_modules/bot_update/example.py
index 10b4d118503885f672c70408220d18c61238110d..6020f9127c8aad0b53f4fa3f55776b5a1807e1c4 100644
--- a/recipe_modules/bot_update/example.py
+++ b/recipe_modules/bot_update/example.py
@@ -35,18 +35,25 @@ def RunSteps(api):
suffix = api.properties.get('suffix')
gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
gerrit_rebase_patch_ref = bool(api.properties.get('gerrit_rebase_patch_ref'))
- api.bot_update.ensure_checkout(
- force=force,
- no_shallow=no_shallow,
- patch=patch,
- with_branch_heads=with_branch_heads,
- output_manifest=output_manifest,
- refs=refs, patch_oauth2=oauth2,
- clobber=clobber,
- root_solution_revision=root_solution_revision,
- suffix=suffix,
- gerrit_no_reset=gerrit_no_reset,
- gerrit_rebase_patch_ref=gerrit_rebase_patch_ref)
+
+ if api.properties.get('test_apply_gerrit_ref'):
+ api.bot_update.apply_gerrit_ref(
+ root='/tmp/test/root',
+ gerrit_no_reset=gerrit_no_reset,
+ gerrit_rebase_patch_ref=gerrit_rebase_patch_ref)
+ else:
+ api.bot_update.ensure_checkout(
+ force=force,
+ no_shallow=no_shallow,
+ patch=patch,
+ with_branch_heads=with_branch_heads,
+ output_manifest=output_manifest,
+ refs=refs, patch_oauth2=oauth2,
+ clobber=clobber,
+ root_solution_revision=root_solution_revision,
+ suffix=suffix,
+ gerrit_no_reset=gerrit_no_reset,
+ gerrit_rebase_patch_ref=gerrit_rebase_patch_ref)
def GenTests(api):
@@ -163,6 +170,12 @@ def GenTests(api):
slavename='somehost',
gerrit_rebase_patch_ref=True
)
+ yield api.test('apply_gerrit_ref') + api.properties(
+ repository='chromium',
+ gerrit_rebase_patch_ref=True,
+ gerrit_no_reset=1,
+ test_apply_gerrit_ref=True,
+ )
yield api.test('tryjob_v8') + api.properties(
mastername='tryserver.chromium.linux',
buildername='linux_rel',
« no previous file with comments | « recipe_modules/bot_update/api.py ('k') | recipe_modules/bot_update/example.expected/apply_gerrit_ref.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698