Commit aac382b3 authored by Aaron Gable's avatar Aaron Gable Committed by Commit Bot

Remove rietveld-based tests from tryserver recipe module

This introduces a pragma: no cover, which is unfortunate.
But this is a prerequisite for removing rietveld support
entirely from the recipe engine without having to do
manual recipe rolls. The entire block of uncovered code
will be removed shortly.

Bug: 770408
Change-Id: I37319f3ae70413adcda655c443325bccffe695d8
Reviewed-on: https://chromium-review.googlesource.com/834455Reviewed-by: 's avatarAndrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
parent 9fce213b
......@@ -42,20 +42,20 @@
Recipe module to ensure a checkout is consistent on a bot.
#### **class [BotUpdateApi](/recipes/recipe_modules/bot_update/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
#### **class [BotUpdateApi](/recipes/recipe_modules/bot_update/api.py#10)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
&mdash; **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#31)(self, name, cmd, \*\*kwargs):**
&mdash; **def [\_\_call\_\_](/recipes/recipe_modules/bot_update/api.py#30)(self, name, cmd, \*\*kwargs):**
Wrapper for easy calling of bot_update.
&mdash; **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#46)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, gerrit_repo=None, gerrit_ref=None, step_name='apply_gerrit', \*\*kwargs):**
&mdash; **def [apply\_gerrit\_ref](/recipes/recipe_modules/bot_update/api.py#45)(self, root, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, gerrit_repo=None, gerrit_ref=None, step_name='apply_gerrit', \*\*kwargs):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#442)(self, bot_update_step):**
&mdash; **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#441)(self, bot_update_step):**
Deapplies a patch, taking care of DEPS and solution revisions properly.
&mdash; **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#68)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, no_shallow=False, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=False, oauth2_json=False, use_site_config_creds=True, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, manifest_name=None, \*\*kwargs):**
&mdash; **def [ensure\_checkout](/recipes/recipe_modules/bot_update/api.py#67)(self, gclient_config=None, suffix=None, patch=True, update_presentation=True, patch_root=None, no_shallow=False, with_branch_heads=False, with_tags=False, refs=None, patch_oauth2=False, oauth2_json=False, use_site_config_creds=True, clobber=False, root_solution_revision=None, rietveld=None, issue=None, patchset=None, gerrit_no_reset=False, gerrit_no_rebase_patch_ref=False, disable_syntax_validation=False, manifest_name=None, \*\*kwargs):**
Args:
use_site_config_creds: If the oauth2 credentials are in the buildbot
......@@ -74,7 +74,7 @@ Args:
manifest_name: The name of the manifest to upload to LogDog. This must
be unique for the whole build.
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#419)(self, project_name, gclient_config=None):**
&mdash; **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#418)(self, project_name, gclient_config=None):**
Returns all property names used for storing the checked-out revision of
a given project.
......@@ -88,7 +88,7 @@ Args:
Returns (list of str): All properties that'll hold the checked-out revision
of the given project. An empty list if no such properties exist.
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#40)(self):**
&emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#39)(self):**
### *recipe_modules* / [cipd](/recipes/recipe_modules/cipd)
[DEPS](/recipes/recipe_modules/cipd/__init__.py#1): [infra\_paths](#recipe_modules-infra_paths), [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
......
......@@ -193,7 +193,7 @@ class TryserverApi(recipe_api.RecipeApi):
self.m.properties['patch_gerrit_url'],
self.m.properties['patch_issue'],
self.m.properties['patch_set'])
elif self.can_apply_issue:
elif self.can_apply_issue: # pragma: no cover
patch_url = (
self.m.properties['rietveld'].rstrip('/') + '/' +
str(self.m.properties['issue']))
......
[
{
"cmd": [
"RECIPE_PACKAGE_REPO[depot_tools]/git_cl.py",
"description",
"-d",
"--rietveld",
"https://codereview.chromium.org/12853011"
],
"name": "git_cl description",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/git_footers.py",
"--json",
"/path/to/tmp/json"
],
"name": "parse description",
"stdin": "foobar",
"~followup_annotations": [
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@"
]
},
{
"cmd": [
"git",
"-c",
"core.quotePath=false",
"diff",
"--cached",
"--name-only"
],
"cwd": "[START_DIR]",
"infra_step": true,
"name": "git diff to analyze patch",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_LOG_LINE@files@foo.cc@@@",
"@@@STEP_LOG_END@files@@@",
"@@@SET_BUILD_PROPERTY@failure_type@\"INVALID_TEST_RESULTS\"@@@",
"@@@SET_BUILD_PROPERTY@subproject_tag@\"v8\"@@@"
]
},
{
"cmd": [
"python",
"-u",
"import sys; sys.exit(1)"
],
"name": "fail",
"~followup_annotations": [
"step returned non-zero exit code: 1",
"@@@STEP_TEXT@foo@@@",
"@@@STEP_FAILURE@@@",
"@@@SET_BUILD_PROPERTY@failure_hash@\"c2311ad770732eade3d2f48247abd147e40a70e7\"@@@"
]
},
{
"name": "$result",
"reason": "Step('fail') failed with return_code 1",
"recipe_result": null,
"status_code": 1
}
]
\ No newline at end of file
[
{
"cmd": [
"RECIPE_PACKAGE_REPO[depot_tools]/git_cl.py",
"description",
"-d",
"--rietveld",
"https://codereview.chromium.org/12853011"
],
"name": "git_cl description",
"stdout": "/path/to/tmp/"
},
{
"cmd": [
"python",
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/git_footers.py",
"--json",
"/path/to/tmp/json"
],
"name": "parse description",
"stdin": "foobar",
"~followup_annotations": [
"@@@STEP_LOG_END@json.output (invalid)@@@",
"@@@STEP_LOG_LINE@json.output (exception)@No JSON object could be decoded@@@",
"@@@STEP_LOG_END@json.output (exception)@@@"
]
},
{
"cmd": [
"git",
"-c",
"core.quotePath=false",
"diff",
"--cached",
"--name-only"
],
"cwd": "[START_DIR]/sub/project",
"infra_step": true,
"name": "git diff to analyze patch",
"stdout": "/path/to/tmp/",
"~followup_annotations": [
"@@@STEP_LOG_LINE@files@sub/project/foo.cc@@@",
"@@@STEP_LOG_END@files@@@",
"@@@SET_BUILD_PROPERTY@failure_type@\"INVALID_TEST_RESULTS\"@@@",
"@@@SET_BUILD_PROPERTY@subproject_tag@\"v8\"@@@"
]
},
{
"cmd": [
"python",
"-u",
"import sys; sys.exit(1)"
],
"name": "fail",
"~followup_annotations": [
"step returned non-zero exit code: 1",
"@@@STEP_TEXT@foo@@@",
"@@@STEP_FAILURE@@@",
"@@@SET_BUILD_PROPERTY@failure_hash@\"c2311ad770732eade3d2f48247abd147e40a70e7\"@@@"
]
},
{
"name": "$result",
"reason": "Step('fail') failed with return_code 1",
"recipe_result": null,
"status_code": 1
}
]
\ No newline at end of file
......@@ -65,16 +65,8 @@ def GenTests(api):
patch_repo_url='http://patch.url/',
patch_ref='johndoe#123.diff'))
yield (api.test('with_rietveld_patch') +
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') +
description_step)
yield (api.test('with_gerrit_patch') +
api.properties.tryserver(gerrit_project='infra/infra'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment