blob: e5bdfc1d488aa5945bae31b43e88956aed365244 [file] [log] [blame]
# Copyright 2021 The Fuchsia 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 recipe_test_api
class RepoTestApi(recipe_test_api.RecipeTestApi):
def snapshot(self, step_name, projects):
ret = self.step_data(
f"{step_name}.repo list",
stdout=self.m.raw_io.output_text(
"\n".join([f"{p} : {p}" for p in projects])
),
)
for p in projects:
ret += self.step_data(
f"{step_name}.get {p} HEAD",
stdout=self.m.raw_io.output_text("foo"),
)
return ret