blob: 41a640e54dcf9f6cabfb1959b9d2f0a693f66e6f [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',
]
PYTHON_VERSION_COMPATIBILITY = "PY3"
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)
)