To enable the merge bot on luci we had to solve a couple of problems: - We cannot use http cookies for auth, so added gcloud auth into merge_bot. - Switch back to original HEAD after running merge bot. Otherwise the version of the merge_bot script can change between invocations. - Do not soft reset when checking out crosvm source. - For less invasive testing, also added a few more exceptions when using MERGE_BOT_TEST so it won't email, etc. - Rename to update_chromeos_merges, as it is more fitting to what the bot is doing BUG=b:233913643 TEST=https://ci.chromium.org/swarming/task/5b58ed4497fda510 Change-Id: Iaa9b4821b70a1e90d19637d01856196bd7852ed5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3692686 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com>
8.9 KiB
Repo documentation for crosvm
Table of Contents
- crosvm (Python3 ✅)
- build_chromeos (Python3 ✅)
- build_linux (Python3 ✅)
- crosvm:examples/build_context (Python3 ✅)
- crosvm:examples/prepare_source (Python3 ✅)
- health_check (Python3 ✅)
- push_to_github (Python3 ✅)
- update_chromeos_merges (Python3 ✅)
Recipe Modules
recipe_modules / crosvm
DEPS: depot_tools/bot_update, depot_tools/gclient, depot_tools/git, 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):
The builder directory is cached between builds to improve build times.
— def prepare_container(self):
— def prepare_git(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
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):
recipes / push_to_github
DEPS: crosvm, recipe_engine/buildbucket, recipe_engine/context, recipe_engine/file, recipe_engine/path, recipe_engine/raw_io, recipe_engine/step
PYTHON_VERSION_COMPATIBILITY: PY3
— def RunSteps(api):
recipes / update_chromeos_merges
DEPS: crosvm, recipe_engine/context, recipe_engine/step
PYTHON_VERSION_COMPATIBILITY: PY3
— def RunSteps(api):