crosvm/infra/README.recipes.md
Dennis Kempin de651d0357 infra: Small process improvements
- Use vpython to call crovm tooling (This provides a predictable python
  environment and allow us to use argh).
- Add build_context() to provide a simple API that readies source and
  container.
- Nest preparation steps to reduce noise on builder page.

BUG=b:233913643
TEST=recipes.py test run

Change-Id: I6800e55f7311b32c6ef61918d13795af1fb3b588
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3674217
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
2022-05-27 20:59:12 +00:00

7.2 KiB
Raw Blame History

Repo documentation for crosvm

Table of Contents

Recipe Modules

Recipes

Recipe Modules

recipe_modules / crosvm

DEPS: depot_tools/bot_update, depot_tools/gclient, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/step

PYTHON_VERSION_COMPATIBILITY: PY3

class CrosvmApi(RecipeApi):

Crosvm specific functionality shared between recipes.

def build_context(self, source=True, container=True):

Prepares everything needed to build crosvm on the revision that needs to be verified.

This updates the cwd to the crosvm source directory, ensures the revision to be tested is checked out and the dev container is ready.

Usage: with api.crosvm.build_context(): api.crosvm.step_in_container("build crosvm", ["cargo build"])

@property
def builder_dir(self):

def prepare_container(self):

def prepare_source(self):

Prepares the local crosvm source for testing in self.source_dir

CI jobs will check out the revision to be tested, try jobs will check out the gerrit change to be tested.

@property
def source_dir(self):

def step_in_container(self, step_name, command):

Runs a luci step inside the crosvm dev container.

Recipes

recipes / build_chromeos

DEPS: crosvm, depot_tools/depot_tools, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/properties, recipe_engine/step

PYTHON_VERSION_COMPATIBILITY: PY3

def BuildAndTest(api, board):

def CleanUp(api):

def PrepareBuild(api):

def RunSteps(api, properties):

def SetupSource(api, workspace):

recipes / build_linux

DEPS: crosvm, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/properties, recipe_engine/step

PYTHON_VERSION_COMPATIBILITY: PY3

def RunSteps(api, properties):

def get_test_args(api, test_arch):

Returns architecture specific arguments for ./tools/run_tests

recipes / crosvm:examples/build_context

DEPS: crosvm

PYTHON_VERSION_COMPATIBILITY: PY3

def RunSteps(api):

recipes / crosvm:examples/prepare_source

DEPS: crosvm, recipe_engine/buildbucket

PYTHON_VERSION_COMPATIBILITY: PY3

def RunSteps(api):

recipes / health_check

DEPS: crosvm, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/properties, recipe_engine/step

PYTHON_VERSION_COMPATIBILITY: PY3

def RunSteps(api):