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