Commit graph

65 commits

Author SHA1 Message Date
Keiichi Watanabe
982c92bb98 ci: kokoro: Add presubmit configs for x86_64-direct
BUG=b:220292205
TEST=continuous-x86_64-direct build looks stable

Change-Id: Ib148b8d2a7601ced633b8ea768e8694dcd5da4bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3715200
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-23 22:04:33 +00:00
Keiichi Watanabe
d001987d6b ci: kokoro: Add continuous-x86_64-direct
Add postsubmit test config for crosvm-direct binary on x86_64.

BUG=b:220292205
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-x86_64-direct.sh

Change-Id: I326c52924cc154485c5941cec82be56547d7d862
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3715071
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-06-22 23:18:35 +00:00
Dennis Kempin
301da40bc5 Kokoro: Fix dry-run merge target
Using HEAD for both calls will cause update-dry-runs to use the
merge branch as a target to do the merge, creating the dry run on top
of the merge.

BUG=None
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-merge-into-chromeos.sh
Change-Id: Ib466272d3acce30888e1e3c5db853be9ded46106

Change-Id: Ifc40ffb81a61a75326b296419a4337c49a8fd7db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3688803
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-06-06 19:42:57 +00:00
Dennis Kempin
ca66addad0 Update merge_bot to support merging across repos
We will be merging from the upstream repo into the cros repo. The
script can be run from both an upstream and a cros checkout, it
will setup the required remotes.

The CLI changes a little. We now require a revision to merge from
needs to be specified, since the script is not setting up the
upstream remote.

CI jobs will simply use HEAD, as the version to merge is already
checked out by the CI system.

BUG=b:233913643
TEST=
./merge_bot update-merges HEAD
./merge_bot update-merges origin/main
./merge_bot update-dry-runs HEAD

Change-Id: I247e1edc3ad951becf5d59b63efd74914bb2205f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3687222
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-06-03 19:12:04 +00:00
Dennis Kempin
b597678ad4 dev_container: Fix reuse logic and add testing
Some recent changes introduced a bug that breaks reusage of
containers. Instead of trying to restart a stopped container,
we delete it instead and start a fresh one.

The code was refactored to allow for testing. The tests run
against the real docker service and are run as part of the health
checks in kokoro / luci.

This CL also gets rid of the custon command line parsing since
luci can now run it with argh available.

BUG=b:234402839
TEST=./tools/dev_containes --self-test [--podman]

Change-Id: Id5eaf0ea83ff07433f8f57cb652b5c393dcb9da3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3681399
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-05-31 21:54:23 +00:00
Daniel Verkamp
ae9b656a2d ci: disable chocolatey progress output on Windows
Add the --no-progress option so that choco does not print ten thousand
lines of "Progress: ... X%" messages in the CI logs.

BUG=None
TEST=kokoro CI

Change-Id: I7ec414f4baeeb530f0dc103b256807c7f642ed53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657051
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2022-05-20 22:37:12 +00:00
Daniel Verkamp
5b0f6aaaae ci: only install Python once in Windows setup script
Previously, the script would install the python package without a
version specifier, then attempt to install a specific version (3.9.0),
but this would fail because the first step installed a newer Python
version:

  A newer version of python (v3.10.4) is already installed.

  Use --allow-downgrade or --force to attempt to install older versions,
  or use side by side to allow multiple versions.

  Chocolatey installed 0/1 packages. 1 packages failed.

Remove the first unversioned step so we always get the requested version
of Python only.

BUG=None
TEST=kokoro CI

Change-Id: I95b224926ee9ebcaacdb7d6c2716381a46ec467c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657850
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-05-20 22:37:12 +00:00
Dennis Kempin
4ebb928ea4 build-chromeos.sh: Clean up cros repo after build
Kokoro will treat the files as build artifacts and tries to rsync
the ~80GB to the executor. See b/30309837.

BUG=b:2089374426
TEST=None

Change-Id: I71df011025a7cff664a134bdfbf5783709365358
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3611872
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-04-28 18:01:47 +00:00
Dennis Kempin
33a368ffaf build-chromeos.sh: Use common.sh
Re-use the existing logic to install python, setup the source and
most importantly, enable SSH debugging.

BUG=b:226975041
TEST=None

Change-Id: I0f8b0251bea163145ba1611b3b36c4bb7c8ee968
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606979
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-04-26 19:08:45 +00:00
Dennis Kempin
05add11e8f Kokoro: Increase build timeout for ChromeOS builder
The ChromeOS builds take a lot longer than other crosvm builds.

BUG=b:226975041
TEST=None

Change-Id: I2cf9071aebba10e46a7b63fed0cafbec7a8b06b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606970
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-04-26 15:54:32 +00:00
Dennis Kempin
e40b5b8f4b build-chromeos.sh: Install python 3.9 for depot_tools
Kokoro uses python2 by default, which breaks repo

BUG=b:226975041
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-chromeos.sh

Change-Id: I2424107c76d52c4bc76cd640114c21fca00f3c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606968
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-04-25 23:01:50 +00:00
Dennis Kempin
0a581d64ef Kokoro: Add ChromeOS post-submit builder
This adds an experimental build script that will build crosvm for
ChromeOS. This will allow us to catch issues on the ChromeOS build of
crosvm earlier in the process.

BUG=b:226975041
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-chromeos.sh

Change-Id: I4a1d906a44191e78f4e656fe76c989bd7e1b6977
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3600764
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-04-22 04:41:03 +00:00
Dennis Kempin
ba4adc0efb Add python presubmit checks
This change adds python type and formatting checks and
consolidates code health checks in ./tools/health-check.

Dealing with relative imports in python is tricky, so
we are making ./tools/impl a proper package with no
directly executable files.

Some of the bash shorthands in ./tools had to be converted
to python for this.

To make the new checks pass, we run the formatter and fix
some mypy type checks.

TEST=./tools/health-check
BUG=b:218559722,b:219965702

Change-Id: Ie18d3d6dd2f5a033141e167a6e1aa762791941d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3558592
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-04-15 19:22:53 +00:00
Dennis Kempin
45df242c01 merge bot: Skip installing python version if it exists already
If the version is installed, but not the default selected, pyenv
can fail.

BUG=None
TEST=Testing in prod..

Change-Id: I5063051dd300f9dbbb057e429a84062341b3324c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3585859
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-04-14 22:23:43 +00:00
Dennis Kempin
9740b944eb merge buildes: Fix formatting of version check
The script broke after the formatter wrapped the string.

BUG=None
TEST=./ci/kokoro/simulate.py build-merge-into-chromeos.sh

Change-Id: Id6e972d786d5a58f6cbb43f80d02f0aa26483967
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3585858
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-04-14 22:06:34 +00:00
Dennis Kempin
b193738186 New merge bot
The new merge bot is written in python to allow us to improve the
merge process.

The new process is as follows:
- The merge bot will only create a new merge when the previous
  ones have been submitted.
- When the bot creates a new merge, it'll split the merge commits
  into smaller changes to make bisection easier.

This allows us to only ever deal with one set of merge commits
instead of piling on new merges day after day.

For dry runs, the new process is:
- The bot will check existing dry runs and abandon them if the CQ
  is done.
- The bot will vote Verified+-1 to indicate if the dry run passed.
- If no more dry runs are active, it'll create a new one.

This ensures we always have a dry run in the CQ and can easily see
in gerrit which ones have passed.

The python script will also allow us to add convenience features
for oncall for retrying bratches, etc.

BUG=b:227347397
TEST=The script can be run locally:
./tools/chromeos/merge_bot update-merges
./tools/chromeos/merge_bot update-dry-runs

Change-Id: I51fc0741f5032868ad07f5e926e570e29cc461fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3583254
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-04-14 21:38:07 +00:00
Anton Romanov
24a226169d Run some win64 tests with wine as part of presubmit
docker container size increases to ~4.7-8 Gb

TEST=./dev_container --hermetic ./tools/presubmit
BUG=none

Change-Id: I49dc03182f6ac5c29e0174618cc3864e073a2eb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3499264
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Auto-Submit: Anton Romanov <romanton@google.com>
2022-04-06 19:45:49 +00:00
Dennis Kempin
5b8a837485 Kokoro merge bot: Remove rebase for now
The recent cherry-pick of a revert has diverged the tree and caused
the commits inside the merge to be rebased as well, which uploads new
gerrit CLs for each commit.

BUG=None
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-x86_64.sh

Change-Id: I01af93c989ab0aba4c2d599d0625f921315a0600
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3566120
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-04-06 17:32:10 +00:00
Vikram Auradkar
de1f006a08 Enable clippy on windows
Also fixes few warning introduced during upstream which linux clippy
run does not catch.

test: py tools\clippy
bug: 226966790
Change-Id: I6979f87be5d6d34727afabafcaccb57631975567
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3553401
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-03-31 16:09:00 +00:00
Dennis Kempin
e871ee9601 Kokoro merge bot: Rebase merges before uploading
This allows the bot to account for manually cherry-picked commits.

To make rebases work properly, we had to fix the commit message
trailers to be added in a separate paragraph. This ensures
git inspect-trailers can add and find the Commit-Id trailer.

BUG=b:226975273
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-merge-into-chromeos.sh

Change-Id: If008be1f1c671ef1d79c6f223f10ea0e8f6742b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3561015
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Maciek Swiech <drmasquatch@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-03-30 22:57:48 +00:00
Vikram Auradkar
2b43443edc Enable vmm_vhost windows tests
Does couple of things
- move tube under right directory
- cleanup cros_async dependency
- export tube module from base
- enable base windows tests
- add verbose flag to test runner

test: built on window and presubmit
bug: b:213151429
bug: b:213153157
Change-Id: I0d1906d7edcc3352db53325ea7527550eaf00895
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3550296
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-03-29 20:29:54 +00:00
Dennis Kempin
cbe2e12759 Kokoro: Use unique identifiers for gerrit API
Change-Ids can refer to multiple CLs when they are cherry-picked.
Use the 'id' field instead wich contains repo and branch info and
is unique across gerrit.

BUG=None
TEST=./ci/kokoro/simulate.py ./ci/kokoro/build-merge-into-chromeos.sh

Change-Id: I7074e310ec7f795527610010c849acceaeb0eb06
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3556231
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-03-28 19:25:44 +00:00
David Stevens
a7a04e6095 ci/kokoro: improve error checking
Check whether or not the rebase succeeds and fix a check that the script
is being run by kokoro.

BUG=None
TEST=tools/presubmit

Change-Id: I59ae6604c3535238f40a7df20c43b9db9e357fe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3546578
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: David Stevens <stevensd@chromium.org>
2022-03-25 00:33:06 +00:00
Vikram Auradkar
ae5118f5c7 Enable windows tests for a few crates
Run tests for sys_util_core, poll_token_derive and balloon_control on
windows.

Using dotfiles to disable/serialize test runs of a subset of crates does
not work well with third party crates as it forces us to commit the dot
file to the crate.

The patch modifies and uses the script that runs linux tests.
This patch also allows us to
- build/test child crate even if parent crate has disabled build/test.
- avoid building crosvm if it is not explicitly specified.

RIP short lived .windows_build_test_skip. You allowed us to run noop
kokoro tests.

Test: py .\tools\impl\test_runner.py --arch x86_64
Bug: b:215610772
Change-Id: Icc6d04ffd7c0c33d4f60aeac16fc7d23881c387d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3459809
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-18 03:18:58 +00:00
Dennis Kempin
9b7471e51a tools/dev_container: Pythonify
Use the new common.py utilities to make turn this bash script into
python. The behavior should be the same.

BUG=b:218559770
TEST=./tools/presubmit

Change-Id: Id1412c2076089fd21f280959d6cde1f4cb64e163
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3469049
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2022-02-18 00:18:56 +00:00
Daniel Verkamp
995c91af7d ci/kokoro: add a no-default-features build
To help find missing feature cfg checks, add a build with all features
disabled to the CI scripts.

BUG=None
TEST=tools/presubmit

Change-Id: I98f38ecc3bf90cbeb081a1fafe4f2f540e4fc348
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3437362
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-02-04 21:19:33 +00:00
Anton Romanov
cb3cabe3ba Upgrade rust toolchain version to 1.58.1
Pre 1.58.1 have CVE-2022-21658
Cros toolchain got upgraded to 1.58.1

BUG=None
TEST=cq

Change-Id: I2ce5a08b40bcc4895c4f2ecef83efd4162d67494
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3435385
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-02-04 02:20:36 +00:00
Vikram Auradkar
f7da4929c1 Rename files to match job config files
TEST=none

Change-Id: I6c1c54ab2960c09a02c10a02359fbdd176423319
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3429623
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Vikram Auradkar <auradkar@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-02 00:00:38 +00:00
Vikram Auradkar
71e74b0a64 Add kokoro build config file and helper script
Build config sets timeout to 40 minutes.
helper script relies on choco to install rustup, which is used
to install rust toolchain.

Bug: 213603713
Test: Tested the toolchain setup part of the script in a
      codelab repo.
Change-Id: Ibf139bbc4ff6fe6c811652767dd885584414dda6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3421515
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Amiosci <brandonamiosci@google.com>
Commit-Queue: Vikram Auradkar <auradkar@google.com>
2022-02-01 07:56:02 +00:00
Dennis Kempin
0520a95161 ci/kokoro: Pythonify the simulate script
Does the same thing, but in python. This should allow us to make
this work on windows as well.

BUG=b:216833094
TEST=./simulate.py build-x86_64.sh

Change-Id: If6eb214c2a3185fbb60a636b89cd03ecf28b42e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3425651
Reviewed-by: Vikram Auradkar <auradkar@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-29 16:49:32 +00:00
Dennis Kempin
145f452cf5 merge-into-chromeos: Exclude dry runs from previous merge commits
Otherwise we end up with this: https://crrev.com/c/3422185

BUG=None
TEST=None

Change-Id: I8abd0e3f4465e9ae2ae34630dde5a3b15e190b09
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3421734
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-28 01:32:07 +00:00
Dennis Kempin
32c3f30e05 merge-into-chromeos: Set Bot-Commit+1 as well
This is an experiment to figure out the permissions needed by
crosvm-bot.
See https://crbug.com/1289780 for details.

BUG=chromium:1289780
TEST=None

Change-Id: Ic202532ceaa2b0d86f51c8670137bde2d8f16868
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3419296
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-27 20:08:51 +00:00
Dennis Kempin
d6c3154b13 merge-into-chromeos: Create a dry run merge as well
The dry run merge is re-created every day and automatically
set to CQ+1. This allows us to check for bad crosvm changes
while we submit parts of the merge chain.

BUG=b:215741244
TEST=./tools/ci/simulate merge-into-chromeos.sh

Change-Id: I0773a99f9858962e9f25bebff1b233d455d33cdd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3417508
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-26 20:47:46 +00:00
Daniel Verkamp
44495f3a8e kokoro: update submodules after rebasing
In case the rebase brought in a commit that updated the submodules, we
should update them after the rebase instead of before. Otherwise the
submodules will be out of date compared to the source.

BUG=None
TEST=None

Change-Id: I398755abc76e9e6672c71ff1fe358a7c201c09fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3403133
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-01-22 00:05:23 +00:00
Dennis Kempin
bf0066f4f9 merge-into-chromeos: Only merge if N commits have been added
We currently have a lot of merges with just 1 or 2 commits in them.
That's a lot of noise.

This CL makes the builder wait until we got at least 5 commits to
merge. This will delay merge commits being created, but our merge
process is usually a few days behind due to CQ delays, so it does
not matter much.

The MIN_COMMIT_COUNT variable can be overwritten when triggering
a manual build in Fusion.

BUG=b:215389423
TEST=./ci/kokoro/simulate build-merge-into-chromeos.sh

Change-Id: Ia24ee0b615ad402060775530e9eb0def7742200e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3402501
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2022-01-20 18:11:34 +00:00
Dennis Kempin
fe0d2a633a merge-into-chromeos: Automatically set CQ+1
Since we have a chain of commits, we need to set all of
them to CQ+1 for the dry run to happen.
Unfortunately, the CQ will only ever run a single build
for a chain of commits. So the dry run will only happen
when all builds have finished.

BUG=b:213932296
TEST=./ci/kokoro/simulate build-merge-into-chromeos.sh

Change-Id: I1883b22ab97da604a4188528ccfb3231a23cb7f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3384220
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-01-12 20:26:36 +00:00
Dennis Kempin
5a250fcb26 merge-into-chromeos: Create chain of merge commits
We can use the gerrit api to detect previous merge commits
the bot has made, then use those as the base for the next merge.

This will create smaller merges and is easier to manage as we do not
have to abandon so many changes.

One complication is detecting possible cherry picks the oncall may
have added to the previous merge commit.

Only open merge commits are taken into account.

BUG=b:213932296
TEST=./ci/kokoro/simulate build-merge-into-chromeos.sh

Change-Id: I795109be4c45bec49068c3e292a3947505755442
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3381832
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2022-01-11 23:35:39 +00:00
Dennis Kempin
e204dda759 Kokoro: Allow manual merge targets in merge-into-chromeos
This allows us to manually specify the merge target when triggering
the Kokoro job to do partial merges.

BUG=b:209034086
TEST=None

Change-Id: If68231b46981dec679445dde50e1fb5ff66e57c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3340211
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
2021-12-14 23:41:33 +00:00
Anton Romanov
c8970b7a76 Add continuous and presubmit-cr armhf job configs for kokoro
Change-Id: Ifb00dc70e8a2af690722a40cbdcd9836b950d929
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3339182
Reviewed-by: Anton Romanov <romanton@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Auto-Submit: Anton Romanov <romanton@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-12-14 19:45:21 +00:00
Anton Romanov
c20f783733 Enable some tests for armhf builds
TEST=./tools/dev_container --hermetic bash -c "./tools/run_tests --target=vm:aarch64 --arch armhf"
BUG=b/203152778

Change-Id: I76da1d029e9b11016b1ed9245c5b09095703fb63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3328099
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2021-12-14 18:11:32 +00:00
Keiichi Watanabe
3e7c388efa tools: Add cargo-doc script
BUG=none
TEST=Run GitHub Action on my personal GitHub repository

Change-Id: I62de2693f3a654e0bbd327eff5931380a153395d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3305958
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
2021-12-09 14:34:31 +00:00
Dennis Kempin
cd0c2b846a kokoro: Add user name / email to commits
This prevents gerrit from claiming we are forging email addresses.

BUG=b:209034086
TEST=None

Change-Id: I9f5bab0684f40ad5220d8c88d89a34e23facab99
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3321734
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-12-08 18:50:50 +00:00
Dennis Kempin
f18de38a02 kokoro: clean repo before merging
There can be leftover files from a previous build.

BUG=b:209034086
TEST=./ci/kokoro/simulate build-merge-into-chromeos.sh

Change-Id: I0f7223bc6dd1769db04408f595764931c3ff2af8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3321730
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2021-12-07 21:03:03 +00:00
Dennis Kempin
fbb2de0188 kokoro: Various fixes to merge-into-chromeos job
- Adds the needed job config
- Makes a copy of the script before git checkout
- Follow naming scheme of other build scripts
- Add reviewer when uploading

BUG=b:209034086
TEST=./ci/kokoro/simulate build-merge-into-chromeos.sh

Change-Id: I279ff6aca7c3c304354a238ebd5c40b4dd272385
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3321726
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2021-12-07 20:50:29 +00:00
Dennis Kempin
e061930706 Add Kokoro build script for merging main into chromeos
The Kokoro build script sets up access to the chromium
gerrit, creates the merge commit and uploads it.

BUG=b:209034086
TEST=./ci/kokoro/simulate merge-to-chromeos.sh

Change-Id: Ia686b937c3d6b0b744d5c2162eb2847c5952e977
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3318793
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-12-06 23:28:26 +00:00
Dennis Kempin
95b80d13b2 dev_container: Preserve container between calls
This vastly improves iterative build times and enables more flexible
usage of the container.

BUG=None
TEST=./tools/dev_container cargo build
First run will build everything. Second run will finish right away.

Change-Id: I9b4eeee0689f0e9d07f0a32f846d21ab42f689f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3292100
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2021-11-19 20:09:39 +00:00
Keiichi Watanabe
e538834fe1 ci: kokoro: Run mdbook command
BUG=none
TEST=kokoro

Change-Id: I61f80da1c6d82979201aa1b3c11b60d9da6ba705
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3255195
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-11-01 19:26:51 +00:00
Keiichi Watanabe
610158aa55 ci: kokoro: push-to-github: Use git push --all instead of --mirror
Unlike git push --mirror, git push --all won't delete remote branch so
that gh-pages branch won't be removed by kokoro, I think.

BUG=b:199692764
TEST=none

Change-Id: I2a5ce2f59e966775d24c25b996a1091af1d6efc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3234557
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-10-20 16:06:04 +00:00
Dennis Kempin
8a1277de1a Kokoro: Rebase changes to ToT before testing
By default Kokoro will use changes as they come from gerrit, which may
have an outdated parent. We want to make sure that we are always testing
against tip of tree so we are confident the presubmit test result will
reflect the postsubmit results.

BUG=b:202275156
TEST=Tested in Kokoro

Change-Id: I2a1d2860a361eee741dc522c9859e32890ff15bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3229947
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-19 17:10:04 +00:00
Dennis Kempin
76e6fd051b Fix push-to-github Kokoro builder
One more fix. Everything seems to work, but the remote is rejecting
an update of the active main branch. Hopefully the last fix needed.

BUG=b:199692764
TEST=Testing in prod.

Change-Id: I4f341cc374080454317cb3ac29cade59fec6aeee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3229958
Tested-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-18 23:22:27 +00:00