• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--- AUTOGENERATED BY `./recipes.py test train` -->
2# Repo documentation for [crosvm](https://chromium.googlesource.com/crosvm/crosvm.git)
3## Table of Contents
4
5**[Recipe Modules](#Recipe-Modules)**
6  * [crosvm](#recipe_modules-crosvm) (Python3 ✅)
7
8**[Recipes](#Recipes)**
9  * [build_chromeos_hatch](#recipes-build_chromeos_hatch) (Python3 ✅)
10  * [build_docs](#recipes-build_docs) (Python3 ✅)
11  * [build_linux](#recipes-build_linux) (Python3 ✅)
12  * [build_windows](#recipes-build_windows) (Python3 ✅)
13  * [crosvm:examples/container_build_context](#recipes-crosvm_examples_container_build_context) (Python3 ✅)
14  * [crosvm:examples/cros_container_build_context](#recipes-crosvm_examples_cros_container_build_context) (Python3 ✅)
15  * [crosvm:examples/host_build_context](#recipes-crosvm_examples_host_build_context) (Python3 ✅)
16  * [crosvm:examples/source_context](#recipes-crosvm_examples_source_context) (Python3 ✅)
17  * [health_check](#recipes-health_check) (Python3 ✅)
18  * [push_to_github](#recipes-push_to_github) (Python3 ✅)
19  * [update_chromeos_merges](#recipes-update_chromeos_merges) (Python3 ✅)
20## Recipe Modules
21
22### *recipe_modules* / [crosvm](/infra/recipe_modules/crosvm)
23
24[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]
25
26PYTHON_VERSION_COMPATIBILITY: PY3
27
28#### **class [CrosvmApi](/infra/recipe_modules/crosvm/api.py#11)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
29
30Crosvm specific functionality shared between recipes.
31
32&emsp; **@property**<br>&mdash; **def [builder\_cache](/infra/recipe_modules/crosvm/api.py#43)(self):**
33
34Dedicated cache directory for each builder.
35
36Luci will try to run each builder on the same bot as previously to keep this cache present.
37
38&emsp; **@property**<br>&mdash; **def [cargo\_home](/infra/recipe_modules/crosvm/api.py#24)(self):**
39
40CARGO_HOME is cached between runs.
41
42&emsp; **@property**<br>&mdash; **def [cargo\_target\_dir](/infra/recipe_modules/crosvm/api.py#29)(self):**
43
44CARGO_TARGET_DIR is cleaned up between runs
45
46&mdash; **def [container\_build\_context](/infra/recipe_modules/crosvm/api.py#62)(self):**
47
48Prepares source and system to build crosvm via dev container.
49
50Usage:
51    with api.crosvm.container_build_context():
52        api.crosvm.step_in_container("build crosvm", ["cargo build"])
53
54&mdash; **def [cros\_container\_build\_context](/infra/recipe_modules/crosvm/api.py#79)(self):**
55
56Prepares source and system to build crosvm via cros container.
57
58Usage:
59    with api.crosvm.cros_container_build_context():
60        api.crosvm.step_in_container("build crosvm", ["cargo build"], cros=True)
61
62&emsp; **@property**<br>&mdash; **def [dev\_container\_cache](/infra/recipe_modules/crosvm/api.py#39)(self):**
63
64&mdash; **def [get\_git\_sha](/infra/recipe_modules/crosvm/api.py#185)(self):**
65
66&mdash; **def [host\_build\_context](/infra/recipe_modules/crosvm/api.py#113)(self):**
67
68Prepares source and system to build crosvm directly on the host.
69
70This will install the required rust version via rustup. However no further dependencies
71are installed.
72
73Usage:
74    with api.crosvm.host_build_context():
75        api.step("build crosvm", ["cargo build"])
76
77&emsp; **@property**<br>&mdash; **def [local\_bin](/infra/recipe_modules/crosvm/api.py#34)(self):**
78
79Directory used to install local tools required by the build.
80
81&mdash; **def [prepare\_git](/infra/recipe_modules/crosvm/api.py#160)(self):**
82
83&emsp; **@property**<br>&mdash; **def [rustup\_home](/infra/recipe_modules/crosvm/api.py#19)(self):**
84
85RUSTUP_HOME is cached between runs.
86
87&mdash; **def [source\_context](/infra/recipe_modules/crosvm/api.py#52)(self):**
88
89Updates the source to the revision to be tested and drops into the source directory.
90
91Use when no build commands are needed.
92
93&emsp; **@property**<br>&mdash; **def [source\_dir](/infra/recipe_modules/crosvm/api.py#14)(self):**
94
95Where the crosvm source will be checked out.
96
97&mdash; **def [step\_in\_container](/infra/recipe_modules/crosvm/api.py#144)(self, step_name, command, cros=False, \*\*kwargs):**
98
99Runs a luci step inside the crosvm dev container.
100
101&mdash; **def [upload\_coverage](/infra/recipe_modules/crosvm/api.py#193)(self, filename):**
102## Recipes
103
104### *recipes* / [build\_chromeos\_hatch](/infra/recipes/build_chromeos_hatch.py)
105
106[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]
107
108PYTHON_VERSION_COMPATIBILITY: PY3
109
110&mdash; **def [RunSteps](/infra/recipes/build_chromeos_hatch.py#17)(api):**
111### *recipes* / [build\_docs](/infra/recipes/build_docs.py)
112
113[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]
114
115PYTHON_VERSION_COMPATIBILITY: PY3
116
117&mdash; **def [RunSteps](/infra/recipes/build_docs.py#20)(api):**
118
119Builds crosvm mdbook and api docs, then uploads them to GCS.
120
121This recipe requires ambient luci authentication. To test locally run:
122   $ luci-auth context ./infra/recipes.py run build_docs
123### *recipes* / [build\_linux](/infra/recipes/build_linux.py)
124
125[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]
126
127PYTHON_VERSION_COMPATIBILITY: PY3
128
129&mdash; **def [RunSteps](/infra/recipes/build_linux.py#73)(api, properties):**
130
131&mdash; **def [collect\_binary\_sizes](/infra/recipes/build_linux.py#24)(api, properties):**
132### *recipes* / [build\_windows](/infra/recipes/build_windows.py)
133
134[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]
135
136PYTHON_VERSION_COMPATIBILITY: PY3
137
138&mdash; **def [RunSteps](/infra/recipes/build_windows.py#16)(api):**
139### *recipes* / [crosvm:examples/container\_build\_context](/infra/recipe_modules/crosvm/examples/container_build_context.py)
140
141[DEPS](/infra/recipe_modules/crosvm/examples/container_build_context.py#7): [crosvm](#recipe_modules-crosvm)
142
143PYTHON_VERSION_COMPATIBILITY: PY3
144
145&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/container_build_context.py#12)(api):**
146### *recipes* / [crosvm:examples/cros\_container\_build\_context](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py)
147
148[DEPS](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py#7): [crosvm](#recipe_modules-crosvm)
149
150PYTHON_VERSION_COMPATIBILITY: PY3
151
152&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/cros_container_build_context.py#12)(api):**
153### *recipes* / [crosvm:examples/host\_build\_context](/infra/recipe_modules/crosvm/examples/host_build_context.py)
154
155[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]
156
157PYTHON_VERSION_COMPATIBILITY: PY3
158
159&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/host_build_context.py#14)(api):**
160### *recipes* / [crosvm:examples/source\_context](/infra/recipe_modules/crosvm/examples/source_context.py)
161
162[DEPS](/infra/recipe_modules/crosvm/examples/source_context.py#7): [crosvm](#recipe_modules-crosvm), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket]
163
164PYTHON_VERSION_COMPATIBILITY: PY3
165
166&mdash; **def [RunSteps](/infra/recipe_modules/crosvm/examples/source_context.py#13)(api):**
167### *recipes* / [health\_check](/infra/recipes/health_check.py)
168
169[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]
170
171PYTHON_VERSION_COMPATIBILITY: PY3
172
173&mdash; **def [RunSteps](/infra/recipes/health_check.py#17)(api):**
174### *recipes* / [push\_to\_github](/infra/recipes/push_to_github.py)
175
176[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]
177
178PYTHON_VERSION_COMPATIBILITY: PY3
179
180&mdash; **def [RunSteps](/infra/recipes/push_to_github.py#18)(api):**
181### *recipes* / [update\_chromeos\_merges](/infra/recipes/update_chromeos_merges.py)
182
183[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]
184
185PYTHON_VERSION_COMPATIBILITY: PY3
186
187&mdash; **def [RunSteps](/infra/recipes/update_chromeos_merges.py#14)(api):**
188
189[depot_tools/recipe_modules/bot_update]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/e8e3e3efcfdb49aa582338abc3027ab643ccae1f/recipes/README.recipes.md#recipe_modules-bot_update
190[depot_tools/recipe_modules/depot_tools]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/e8e3e3efcfdb49aa582338abc3027ab643ccae1f/recipes/README.recipes.md#recipe_modules-depot_tools
191[depot_tools/recipe_modules/gclient]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/e8e3e3efcfdb49aa582338abc3027ab643ccae1f/recipes/README.recipes.md#recipe_modules-gclient
192[depot_tools/recipe_modules/git]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/e8e3e3efcfdb49aa582338abc3027ab643ccae1f/recipes/README.recipes.md#recipe_modules-git
193[depot_tools/recipe_modules/gsutil]: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/e8e3e3efcfdb49aa582338abc3027ab643ccae1f/recipes/README.recipes.md#recipe_modules-gsutil
194[recipe_engine/recipe_modules/buildbucket]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-buildbucket
195[recipe_engine/recipe_modules/cipd]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-cipd
196[recipe_engine/recipe_modules/context]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-context
197[recipe_engine/recipe_modules/file]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-file
198[recipe_engine/recipe_modules/json]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-json
199[recipe_engine/recipe_modules/path]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-path
200[recipe_engine/recipe_modules/platform]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-platform
201[recipe_engine/recipe_modules/properties]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-properties
202[recipe_engine/recipe_modules/raw_io]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-raw_io
203[recipe_engine/recipe_modules/step]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/README.recipes.md#recipe_modules-step
204[recipe_engine/wkt/RecipeApi]: https://chromium.googlesource.com/infra/luci/recipes-py.git/+/b558aa996d1ebbf054decd3bbc5fbda769359445/recipe_engine/recipe_api.py#886
205