blob: ad7a9364f1e21b45a6a9574885cc2a88078ef332 [file] [log] [blame]
# -*- coding: utf-8 -*-
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Copied from
# https://chromium.googlesource.com/chromiumos/infra/recipes/+/HEAD/recipe_modules/repo/
# pylint: disable=missing-module-docstring
DEPS = [
'fuchsia/status_check',
'pigweed/repo',
]
def RunSteps(api):
api.repo.init("https://manifest/url")
api.repo.sync(attempts=2)
def GenTests(api):
yield (
api.status_check.test('fail-pass')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=0)
)
yield (
api.status_check.test('fail-fail', status='infra_failure')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=1)
)