diff --git a/infra/config/recipes.cfg b/infra/config/recipes.cfg index 4c5147452..1bc2193c8 100644 --- a/infra/config/recipes.cfg +++ b/infra/config/recipes.cfg @@ -15,7 +15,7 @@ "deps": { "recipe_engine": { "branch": "master", - "revision": "b9ad522afc7ff805c27a781d405b33e35f542dab", + "revision": "43435a041607b9d60235b66301ee4c112ba86d15", "url": "https://chromium.googlesource.com/infra/luci/recipes-py.git" } }, diff --git a/recipes/recipe_modules/presubmit/api.py b/recipes/recipe_modules/presubmit/api.py index 0d7fa8981..f1ae030a5 100644 --- a/recipes/recipe_modules/presubmit/api.py +++ b/recipes/recipe_modules/presubmit/api.py @@ -132,7 +132,7 @@ class PresubmitApi(recipe_api.RecipeApi): # TODO(iannucci): Shouldn't we also mark failure on timeouts? raw_result.summary_markdown += ( '\n\nTimeout occurred during presubmit step.') - if retcode == 1: + elif retcode == 1: raw_result.status = common_pb2.FAILURE self.m.tryserver.set_test_failure_tryjob_result() else: diff --git a/recipes/recipe_modules/presubmit/tests/execute.py b/recipes/recipe_modules/presubmit/tests/execute.py index 0fb0984b0..6d6281d21 100644 --- a/recipes/recipe_modules/presubmit/tests/execute.py +++ b/recipes/recipe_modules/presubmit/tests/execute.py @@ -207,7 +207,7 @@ def GenTests(api): 'warnings': [] }, retcode=2) ) + - api.post_process(post_process.StatusFailure) + + api.post_process(post_process.StatusException) + api.post_process(post_process.ResultReason, textwrap.dedent(u''' ### There are 1 error(s), 0 warning(s), and 0 notifications(s). Here are the errors: @@ -233,7 +233,7 @@ def GenTests(api): api.runtime(is_experimental=False, is_luci=True) + api.buildbucket.try_build(project='infra') + api.step_data('presubmit', api.json.output(None, retcode=1)) + - api.post_process(post_process.StatusFailure) + + api.post_process(post_process.StatusException) + api.post_process(post_process.ResultReason, bug_msg) + api.post_process(post_process.DropExpectation) ) @@ -243,7 +243,7 @@ def GenTests(api): api.runtime(is_experimental=False, is_luci=True) + api.buildbucket.try_build(project='infra') + api.step_data('presubmit', api.json.output(None, retcode=2)) + - api.post_process(post_process.StatusFailure) + + api.post_process(post_process.StatusException) + api.post_process(post_process.ResultReason, bug_msg) + api.post_process(post_process.DropExpectation) )