blob: e3fefbf955020ede8973886c8ca1c4f45e2fed67 [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 = [
'pigweed/repo',
]
def RunSteps(api):
api.repo.init("https://manifest/url")
api.repo.sync(attempts=2)
def GenTests(api):
yield (
api.test('fail-pass')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=0)
)
yield (
api.test('fail-fail', status='INFRA_FAILURE')
+ api.step_data('repo sync', retcode=1)
+ api.step_data('repo sync (2)', retcode=1)
)