bot_update: stop failing with a KeyError in the recipe on failure.
This has been low-key driving me bananas for a while, and I've seen it confuse sheriffs etc many times. Change-Id: If46ab55821447a3a70a3f0ea774c017f29fc7400 Reviewed-on: https://chromium-review.googlesource.com/c/1286819 Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: John Budorick <jbudorick@chromium.org>changes/19/1286819/2
parent
08faab99d4
commit
1333933200
@ -0,0 +1,34 @@
|
||||
# Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
from recipe_engine import post_process
|
||||
|
||||
DEPS = [
|
||||
'bot_update',
|
||||
'gclient',
|
||||
'recipe_engine/json',
|
||||
]
|
||||
|
||||
|
||||
def RunSteps(api):
|
||||
api.gclient.set_config('depot_tools')
|
||||
api.bot_update.ensure_checkout()
|
||||
|
||||
|
||||
def GenTests(api):
|
||||
yield (
|
||||
api.test('basic') +
|
||||
api.post_process(post_process.StatusCodeIn, 0) +
|
||||
api.post_process(post_process.DropExpectation)
|
||||
)
|
||||
|
||||
yield (
|
||||
api.test('failure') +
|
||||
api.override_step_data(
|
||||
'bot_update',
|
||||
api.json.output({'did_run': True}),
|
||||
retcode=1) +
|
||||
api.post_process(post_process.StatusCodeIn, 1) +
|
||||
api.post_process(post_process.DropExpectation)
|
||||
)
|
Loading…
Reference in New Issue