<!--- AUTOGENERATED BY `./recipes.py test train` -->
# Repo documentation for [crosvm](https://chromium.googlesource.com/crosvm/crosvm.git)
## Table of Contents

**[Recipe Modules](#Recipe-Modules)**
  * [crosvm](#recipe_modules-crosvm)

**[Recipes](#Recipes)**
  * [build_baguette_image](#recipes-build_baguette_image) &mdash; Recipe for building a Baguette rootfs image.
  * [build_chromeos_hatch](#recipes-build_chromeos_hatch)
  * [build_docs](#recipes-build_docs)
  * [build_linux](#recipes-build_linux)
  * [build_windows](#recipes-build_windows)
  * [crosvm:examples/container_build_context](#recipes-crosvm_examples_container_build_context)
  * [crosvm:examples/cros_container_build_context](#recipes-crosvm_examples_cros_container_build_context)
  * [crosvm:examples/host_build_context](#recipes-crosvm_examples_host_build_context)
  * [crosvm:examples/source_context](#recipes-crosvm_examples_source_context)
  * [health_check](#recipes-health_check)
  * [presubmit](#recipes-presubmit)
  * [push_to_github](#recipes-push_to_github)
  * [update_chromeos_merges](#recipes-update_chromeos_merges)
  * [uprev_baguette_image](#recipes-uprev_baguette_image) &mdash; Recipe for uploading uprevs of the baguette image.
## Recipe Modules

### *recipe_modules* / [crosvm](/infra/recipe_modules/crosvm)

[DEPS](/infra/recipe_modules/crosvm/__init__.py#7): [depot\_tools/bot\_update][depot_tools/recipe_modules/bot_update], [depot\_tools/gclient][depot_tools/recipe_modules/gclient], [depot\_tools/git][depot_tools/recipe_modules/git], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/cipd][recipe_engine/recipe_modules/cipd], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]


#### **class [CrosvmApi](/infra/recipe_modules/crosvm/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**

Crosvm specific functionality shared between recipes.

&emsp; **@property**<br>&mdash; **def [builder\_cache](/infra/recipe_modules/crosvm/api.py#43)(self):**

Dedicated cache directory for each builder.

Luci will try to run each builder on the same bot as previously to keep this cache present.

&emsp; **@property**<br>&mdash; **def [cargo\_home](/infra/recipe_modules/crosvm/api.py#24)(self):**

CARGO_HOME is cached between runs.

&emsp; **@property**<br>&mdash; **def [cargo\_target\_dir](/infra/recipe_modules/crosvm/api.py#29)(self):**

CARGO_TARGET_DIR is cleaned up between runs

&mdash; **def [container\_build\_context](/infra/recipe_modules/crosvm/api.py#62)(self):**

Prepares source and system to build crosvm via dev container.

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

&mdash; **def [cros\_container\_build\_context](/infra/recipe_modules/crosvm/api.py#79)(self):**

Prepares source and system to build crosvm via cros container.

Usage:
    with api.crosvm.cros_container_build_context():
        api.crosvm.step_in_container("build crosvm", ["cargo build"], cros=True)

&emsp; **@property**<br>&mdash; **def [dev\_container\_cache](/infra/recipe_modules/crosvm/api.py#39)(self):**

&mdash; **def [get\_git\_sha](/infra/recipe_modules/crosvm/api.py#186)(self):**

&mdash; **def [host\_build\_context](/infra/recipe_modules/crosvm/api.py#113)(self):**

Prepares source and system to build crosvm directly on the host.

This will install the required rust version via rustup. However no further dependencies
are installed.

Usage:
    with api.crosvm.host_build_context():
        api.step("build crosvm", ["cargo build"])

&emsp; **@property**<br>&mdash; **def [local\_bin](/infra/recipe_modules/crosvm/api.py#34)(self):**

Directory used to install local tools required by the build.

&mdash; **def [prepare\_git](/infra/recipe_modules/crosvm/api.py#161)(self):**

&emsp; **@property**<br>&mdash; **def [rustup\_home](/infra/recipe_modules/crosvm/api.py#19)(self):**

RUSTUP_HOME is cached between runs.

&mdash; **def [source\_context](/infra/recipe_modules/crosvm/api.py#52)(self):**

Updates the source to the revision to be tested and drops into the source directory.

Use when no build commands are needed.

&emsp; **@property**<br>&mdash; **def [source\_dir](/infra/recipe_modules/crosvm/api.py#14)(self):**

Where the crosvm source will be checked out.

&mdash; **def [step\_in\_container](/infra/recipe_modules/crosvm/api.py#144)(self, step_name, command, cros=False, \*\*kwargs):**

Runs a luci step inside the crosvm dev container.

&mdash; **def [upload\_coverage](/infra/recipe_modules/crosvm/api.py#194)(self, filename):**
## Recipes

### *recipes* / [build\_baguette\_image](/infra/recipes/build_baguette_image.py)

[DEPS](/infra/recipes/build_baguette_image.py#19): [depot\_tools/bot\_update][depot_tools/recipe_modules/bot_update], [depot\_tools/depot\_tools][depot_tools/recipe_modules/depot_tools], [depot\_tools/gclient][depot_tools/recipe_modules/gclient], [depot\_tools/git][depot_tools/recipe_modules/git], [depot\_tools/gsutil][depot_tools/recipe_modules/gsutil], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step], [recipe\_engine/time][recipe_engine/recipe_modules/time]


Recipe for building a Baguette rootfs image.

&mdash; **def [RunSteps](/infra/recipes/build_baguette_image.py#49)(api: RecipeApi, properties: BuildBaguetteImageProperties):**
### *recipes* / [build\_chromeos\_hatch](/infra/recipes/build_chromeos_hatch.py)

[DEPS](/infra/recipes/build_chromeos_hatch.py#7): [crosvm](#recipe_modules-crosvm), [depot\_tools/depot\_tools][depot_tools/recipe_modules/depot_tools], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/build_chromeos_hatch.py#17)(api):**
### *recipes* / [build\_docs](/infra/recipes/build_docs.py)

[DEPS](/infra/recipes/build_docs.py#7): [crosvm](#recipe_modules-crosvm), [depot\_tools/gsutil][depot_tools/recipe_modules/gsutil], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/build_docs.py#20)(api):**

Builds crosvm mdbook and api docs, then uploads them to GCS.

This recipe requires ambient luci authentication. To test locally run:
   $ luci-auth context ./infra/recipes.py run build_docs
### *recipes* / [build\_linux](/infra/recipes/build_linux.py)

[DEPS](/infra/recipes/build_linux.py#11): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/build_linux.py#74)(api, properties):**

&mdash; **def [collect\_binary\_sizes](/infra/recipes/build_linux.py#24)(api, properties):**
### *recipes* / [build\_windows](/infra/recipes/build_windows.py)

[DEPS](/infra/recipes/build_windows.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/build_windows.py#16)(api):**
### *recipes* / [crosvm:examples/container\_build\_context](/infra/recipe_modules/crosvm/examples/container_build_context.py)

[DEPS](/infra/recipe_modules/crosvm/examples/container_build_context.py#7): [crosvm](#recipe_modules-crosvm)


&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/container_build_context.py#12)(api):**
### *recipes* / [crosvm:examples/cros\_container\_build\_context](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py)

[DEPS](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py#7): [crosvm](#recipe_modules-crosvm)


&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py#12)(api):**
### *recipes* / [crosvm:examples/host\_build\_context](/infra/recipe_modules/crosvm/examples/host_build_context.py)

[DEPS](/infra/recipe_modules/crosvm/examples/host_build_context.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/host_build_context.py#14)(api):**
### *recipes* / [crosvm:examples/source\_context](/infra/recipe_modules/crosvm/examples/source_context.py)

[DEPS](/infra/recipe_modules/crosvm/examples/source_context.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket]


&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/source_context.py#13)(api):**
### *recipes* / [health\_check](/infra/recipes/health_check.py)

[DEPS](/infra/recipes/health_check.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/health_check.py#17)(api):**
### *recipes* / [presubmit](/infra/recipes/presubmit.py)

[DEPS](/infra/recipes/presubmit.py#13): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/json][recipe_engine/recipe_modules/json], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/presubmit.py#26)(api, properties):**
### *recipes* / [push\_to\_github](/infra/recipes/push_to_github.py)

[DEPS](/infra/recipes/push_to_github.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/file][recipe_engine/recipe_modules/file], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/push_to_github.py#18)(api):**
### *recipes* / [update\_chromeos\_merges](/infra/recipes/update_chromeos_merges.py)

[DEPS](/infra/recipes/update_chromeos_merges.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/step][recipe_engine/recipe_modules/step]


&mdash; **def [RunSteps](/infra/recipes/update_chromeos_merges.py#14)(api):**
### *recipes* / [uprev\_baguette\_image](/infra/recipes/uprev_baguette_image.py)

[DEPS](/infra/recipes/uprev_baguette_image.py#21): [depot\_tools/git][depot_tools/recipe_modules/git], [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/step][recipe_engine/recipe_modules/step]


Recipe for uploading uprevs of the baguette image.

&mdash; **def [RunSteps](/infra/recipes/uprev_baguette_image.py#37)(api: RecipeApi, properties: UprevBaguetteImageProperties):**

[depot_tools/recipe_modules/bot_update]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/57f57b09600f6969f7ac912079671830da88e127/recipes/README.recipes.md#recipe_modules-bot_update
[depot_tools/recipe_modules/depot_tools]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/57f57b09600f6969f7ac912079671830da88e127/recipes/README.recipes.md#recipe_modules-depot_tools
[depot_tools/recipe_modules/gclient]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/57f57b09600f6969f7ac912079671830da88e127/recipes/README.recipes.md#recipe_modules-gclient
[depot_tools/recipe_modules/git]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/57f57b09600f6969f7ac912079671830da88e127/recipes/README.recipes.md#recipe_modules-git
[depot_tools/recipe_modules/gsutil]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/57f57b09600f6969f7ac912079671830da88e127/recipes/README.recipes.md#recipe_modules-gsutil
[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-buildbucket
[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-cipd
[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-context
[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-file
[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-json
[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-path
[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-platform
[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-properties
[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-raw_io
[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-step
[recipe_engine/recipe_modules/time]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/README.recipes.md#recipe_modules-time
[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/98068f7d9e3b2daa95c3cbad59cc32181440328b/recipe_engine/recipe_api.py#433
