Commit graph

36 commits

Author SHA1 Message Date
Keiichi Watanabe
9d7887049d tools: Stop generating API docs for libvda
This should fix the GitHub Action as well.

BUG=none
TEST=kokoro
TEST=Run GitHub Action on my crosvm fork

Change-Id: Iff00d7d68c8dc38cda8222850bcc06ba2b558d01
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3327801
Auto-Submit: Keiichi Watanabe <keiichiw@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-09 18:01:34 +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
Anton Romanov
14e024ae4e Make aarch64 vm usable for running armhf binaries.
BUG: b/203152778
TEST: ./tools/run_tests --target vm:aarch64; ./tools/run_tests vm:aarch64 --arch armhf
Change-Id: I5b774ebf66f1a0a71e025dc364a6e85d43d3b6cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3324410
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2021-12-09 01:08:45 +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
Anton Romanov
bbec8ebf65 Use tmpfs for /tmp in dev container
This works around quirkiness of sparse file support in overlayfs.

Revert "sys_util: ignore seek_hole tests for kokoro uprev"
This reverts commit 3d0e51f71c.

BUG=b:208901617

TEST=./tools/dev_container --hermetic bash -c "cd common/sys_util; cargo test seek_"

Change-Id: Id4d809f09a71b5cd134b5eb9bf6a5f970e5503c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3319404
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2021-12-07 17:44:17 +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
0830e2f11c chromeos: Add script for merging from cros/main
This script can be used to manually create merge
commits to be uploaded to gerrit, and will also
be used by the buildes doing automatic uprevs.

The main purpose of the script is to create a helpful
commit message describing the commits included.

BUG=b:209034086
TEST=./tools/chromeos/create_merge

Change-Id: I65715ebefb182a5287b5052b6af56361e41d8efd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3315374
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-12-06 21:19:19 +00:00
Keiichi Watanabe
af095c0fe4 tools: clippy: Enable --all-features
BUG=none
TEST=./tools/clippy

Change-Id: Ibf673de1a76e529fc350999531d7a198a318be2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3295302
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-11-25 03:15:49 +00:00
Christian Blichmann
1a2cfa90c3 dev_container: Improve support for podman
Commit 95b80d1 made the dev container persistent between invocations,
but hard-coded `docker` again. This change fixes that and also adds
further improvements:
- Do not use `--privileged` with podman. If the rootless user has
  permissions to access `/dev/kvm`, so will the container.
- Map `/dev/vhost-net` and `/dev/vhost-vsock` as well.
- Use `BASH_SOURCE` to find this script's directory. As we're using Bash
  to start with, this is more robust than using plain `$0`.

BUG=None
TEST=Run `./tools/dev_container cargo build` with Podman and Docker

Change-Id: I05c699f327c8e1c4f3c4df9679ee92bf7e609e2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3295372
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Christian Blichmann <cblichmann@google.com>
2021-11-23 08:41:17 +00:00
Dennis Kempin
89ea04b4da ./tools/presubmit: Parallel execution and use dev container
The updated presubmit script allows parallel execution of checks
with --tmux.

It will also try to detect if the host is set up for aarch64 builds
and use the dev container if needed.

BUG=None
TEST=./tools/presubmit --tmux

Change-Id: I0247c39d826ee38d5f7f689de5e63380fe789cf4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3292101
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-19 20:09:40 +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
Dennis Kempin
d012f3ddcf test_runner Use workspace for building and testing
Instead of enumerating crosvm crates separately, we can now use
the workspace to build all tests for crosvm.

This enables the vmm_vhost tests.

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

Change-Id: I2af84ad8111e874ddea5e438bda41599caf1fd30
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3287463
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-19 20:09:38 +00:00
Dennis Kempin
a1e42f07ea Enable clippy on more workspace crates
As before, some are automatically fixed by clippy, some manually
fixed.

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

Change-Id: Ifcab4cf60775ee6bb7d4530af6406a74958432ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3283683
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-15 23:55:42 +00:00
Dennis Kempin
dc629f5f05 Clippy fixes in common/* crates
Some automatic fixes by clippy, some manual nit fixes.

This enables clippy on all but the cros_async crate, which
is to be replaced with cros_async2 soon.

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

Change-Id: I2b3a09b67ead64f2adb71dd4f94465b0d65a7c65
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3282678
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-11-15 23:08:55 +00:00
Daniel Verkamp
c13c0c210b enumn: switch to upstream crates.io version
Developers may need to manually clean up the common/enumn directory - it
will be left behind if there are build artifacts (Cargo.lock, target
directory, etc.):

  rm -rf common/enumn

BUG=b:205344148
TEST=cargo build
TEST=tools/presubmit
TEST=emerge-hatch crosvm # with https://crrev.com/c/3265967

Change-Id: I1af3bdd22f40e87895a78a5cbc8033476058c927
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3278774
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-11-15 21:03:25 +00:00
Keiichi Watanabe
eef484c20a tools: chromeos: Use relative path to Cargo.toml in setup_cargo
This change will allow the script to be executed from any path.

BUG=none
TEST=run tools/chromeos/setup_cargo from outside of crosvm directory

Change-Id: I9752f4a41987259f446431bf89c322095ef26e63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3280361
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Keiichi Watanabe <keiichiw@chromium.org>
2021-11-15 18:18:18 +00:00
Dennis Kempin
3a6b7f11ce tools/clippy: Move allow-list to .cargo/config.toml
This applies the same clippy config to rust_analyzer
as well.

BUG=b:193893457
TEST=./tools/clippy and VSCode show the same linter results

Change-Id: I5deec4a24d71fec4692ed708664130f46c1311b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3278773
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-11-12 20:55:25 +00:00
Dennis Kempin
10e79005c3 tools: Update clippy and fmt to make use of workspace
We have not been running clippy on many crates before. This CL
does not contain any clippy fixes, but documents how many issues
each disabled clippy check and crate currently has.

Many of them should be easy to fix.

BUG=b:192425184
TEST=./tools/presubmit --quick

Change-Id: I9ea25bc9a24d405700027ca4e72fb2a50e376c9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3276668
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-11-11 23:52:43 +00:00
Keiichi Watanabe
3a6ec148d6 third_party/vmm_vhost: Add vmm_vhost code into /third_party/
Move rust-vmm/vhost code from chromiumos's third_party directory to
crosvm's one.

Note that we have crrev.com/c/3269863 for license files in Chrome OS
ebuild.

Changes:
* Copied vmm_vhost files at "7c95b4a2 rust-vmm/vhost: switch to upstream
tempfile", whose latest upstream commit is "488b3adc fix warning:
unaligned_references".
* Remove [patch.crates-io] section from its Cargo.toml.
* Add attributes to skip `clippy::bool_assert_comparison` and
`clippy::needless_borrow`, which will be fixed in following CLs.
* Update crosvm's Cargo.toml and tools/chromeos/setup_cargo

BUG=b:205511695
TEST=tools/chromeos/setup_cargo && cargo build

Change-Id: Icee201b39ff1d352df59469a6c8668fc7cb92ab9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3267912
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
2021-11-10 08:42:11 +00:00
Christian Blichmann
6addda2203 Add override for container tool in dev_container script
This change allows to override the command line tool that is used to
start the dev container in the `tools/dev_container` script. The
Makefile for creating the dev container uses the `DOCKER` env var to
implement this, so this is used here as well.

Rationale: Googlers are advised to not install Docker
(go/dont-install-docker) and to use Podman instead.

If the `DOCKER` variable is unset, the script will try to use
Docker first and podman.

Change-Id: I33bc8e4af632fa982406e838e762572407ccdc22
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3259939
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Christian Blichmann <cblichmann@google.com>
2021-11-05 08:40:43 +00:00
Dennis Kempin
ccb9014afb Deprecate old dev tooling scripts
All of the developer tooling has moved to ./tools to make them
easier to discover.

BUG=None
TEST=None

Change-Id: I4daf6a0ca08c94a0c35ce8bc52f9d86e4cb15de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251781
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-11-02 22:23:03 +00:00
Junichi Uekawa
b933598310 crosvm: Add python3-pip dependency.
This is required for the following step.

Updated installation steps so that it is possible to follow the steps
and build.

BUG=chromium:1265286
TEST=./install-deps inside docker container running ubuntu.

Change-Id: Icd6b1c9c3c74c790aba2fd41050ebd2f3470e946
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3255185
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
2021-11-01 23:58:39 +00:00
Dennis Kempin
8f5978fda2 crosvm: Do not use .cargo/config.toml
Building crates in common/ will try to access the file, but won't
be allowed to read it with CROS_WORKON_SUBTREE set.

BUG=b:195126527
TEST=./tools/run_tests --target=vm:aarch64

Change-Id: Ic455ca6c3102dd363daf70468e5d89003d10bb4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3254042
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: Abhishek Bhardwaj <abhishekbh@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
2021-10-30 00:16:33 +00:00
Dennis Kempin
8a1c50d5cd Refactoring: Move various general purpose crates to common/
This change contains the results of running

./tools/contib/cargo_refactor.py

This will break the next uprev, and needs to be synchronizized
with the corresponding ebuild changes in https://crrev.com/c/3248925

BUG=b:195126527
TEST=./tools/run_tests

Change-Id: Ied15a1841887bb8f59fba65b912b81acf69beb73
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248129
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-29 22:31:43 +00:00
Keiichi Watanabe
80801406ce github: Use install-deps script
We now install newer meson via pip instead of apt-get.

BUG=none
TEST=run GitHub action on my personal account

Change-Id: Icbe55bf06e84253cd26e676647bca17408ab9d9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251824
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-29 16:19:21 +00:00
Dennis Kempin
6e3350a956 Add base crate to cargo_refactor
We are adding an ebuild file for this crate in a future
CL: https://crrev.com/c/3251800

BUG=b:195126527
TEST=Run the script

Change-Id: If58c28075d5f3a3d2ad2b8c55714d1f8cdb968ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3251784
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-28 21:04:59 +00:00
Dennis Kempin
783791441d Refactor script: Move non-workspace crates to common/
This CL contains just a refactoring script, a follow-up contains
the result of running it. This is easier to review than 100s of
search/replace.

I think it makes sense to leave this script around for future
reference if we need to shuffle things around again.

BUG=b:195126527
TEST=None

Change-Id: Ic8cc69946b8e6908877e4fbde44230d40a1ea566
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3232967
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-27 22:51:25 +00:00
Dennis Kempin
6fdbcacce7 Add uprev_ebuilds script
This script allows us to generate manual uprev CLs the same way
PUpr creates them.

BUG=b:204223210
TEST=./tools/chromeos/uprev_ebuilds

Change-Id: I45f9f0f4d33f8782637455b578688fa9b504fe8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248905
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-27 22:51:24 +00:00
Dennis Kempin
df7d744fec test_runner: Parallelize building of common/ crates
Each of these is a separate workspace and can be built in
parallel.

BUG=b:195126527
TEST=./tools/run_tests

Change-Id: I9ad61b5d5d83903fda36c948ba470bba8f608d46
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248128
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-27 19:53:07 +00:00
Dennis Kempin
85d5655160 test_runner: Refer to crates by their names, not paths
When looking up crate options from test_options.py we used their
path relative to the crosvm root (e.g. common/p9). But when looking
up options for binaries, the name is parsed from cargo output and
just the crate name (e.g. p9). Fix this by just using the crate
name.

BUG=b:195126527
TEST=./tools/run_tests

Change-Id: I09a3469daa071dc66295d777449dc101a6564162
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3248127
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-27 19:53:06 +00:00
Dennis Kempin
65740a6842 Uprev to rust 1.55.0
Includes some fixes for new clippy checks. A rebuilt
dev_container that ships the new toolchain.

This allows us to get rid of the annoying cargo clean
before running clippy.

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

Change-Id: I9d486fbcf7b2d468f6a1375ac7df95091a2c1465
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3232277
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-19 19:12:52 +00:00
Dennis Kempin
ee56b2ddec Add presubmit script
Consolidates the utility scripts from bin/ into tools/.
Adds a 'presubmit' utility script to run a set of checks and
tests.

This won't be a git hook, but can be manually used to verify
changes before uploading.

BUG=b:199951064
TEST=./tools/presubmit --quick
./tools/dev_container ./tools/presubmit

Change-Id: Iac7c11fca0beaa6d4f214319149ef385fa5ced70
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3225139
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-18 20:10:41 +00:00
Dennis Kempin
18724772c2 Add test runner ./tools/run_tests
The new runner makes use of the simplified crosvm build and greatly
improves execution speed by gathering test binaries from cargo output
and executes them directly in parallel.

This allows all of our tests to execute in ~5 seconds when run locally.

The new test runner also makes use of the new testvm tools to make it
easy to switch between testing on the host, in a VM or via SSH on a
remote device.

See ./tools/run_tests --help for usage instructions.

To allow more iterative testing with the same test targets, this CL
includes a set_test_target script to write env vars that instruct cargo
to build for the target arch and run on the test target.

Note: The test runner can build for armhf, but we need build file fixed
to allow armhf to build successfully.

BUG=b:199951064
TEST=Inside ./tools/dev_container:
./tools/run_tests --target=host
./tools/run_tests --target=vm:aarch64
./tools/run_tests --aarch=armhf --build-only
./tools/set_test_target vm:aarch64 && source .envrc
cargo test

Change-Id: I60291fa726fb2298f62d1f032e55ed6e7ab1c4ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221779
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-15 22:12:03 +00:00
Dennis Kempin
c4ec996103 Add new dev container and install-deps scripts
The new container just provides a standard debian box with a
rust toolchain.
Installation of dependencies has been extracted into scripts
which can also be used to set up a machine for development.

This will replace the current ./ci/ containers.

BUG=b:199950887,b:199950423
TEST=./tools/dev_container ./tools/run_tests

Change-Id: I832bc5b129246923df937a34614b4d74955304dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221781
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
2021-10-15 22:12:02 +00:00
Dennis Kempin
af0144e51b testvm: Use prebuilts instead of building on-the-fly
We need to download a base image anyway, so we might as well make
that a full prebuilt of our VM image. This makes the initial
startup of ./tools/aarch64vm significantly faster. It also makes
it easier to add the prebuilt into a Docker dev container later.

Also move the VM data into the cargo target dir so we do not
dirty the src dir.

A Makefile for building and uploading the prebuilt has been added.

This change also moved the testvm code from ./tools/testvm into
./tools/impl so the python code can be shared with future scripts
(relative imports from other folders are tricky in Python).

BUG=b:199951064
TEST=./tools/aarch64vm ssh

Change-Id: I3fb57bfb8f7330b765e9be5ded821615ecddd841
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3221704
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-10-15 22:02:24 +00:00
Dennis Kempin
bfa99f02ba Add testvm.py tool for managing test VMs
The script can be used to run VMs to test crosvm in a controlled
environment, and most importantly, to test crosvm on aarch64.

This will eventually replace the current Docker based VM setup
process and will be integrated into our test runner to allow aarch64
test runs without using Docker.

Run `/tools/aarch64vm` for usage instructions.

Note: I will make a follow-up change to consolidate all of our dev
tools and scripts (e.g. clippy or rustfmt) in the tools directory.

BUG=b:200562467
TEST=
./tools/aarch64vm ssh
./tools/x86vm ssh

Change-Id: Idef8256bf6737b2915912984a44240ba39c6bc2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3176381
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-09-23 17:47:20 +00:00