Commit graph

5 commits

Author SHA1 Message Date
Dennis Kempin
6edc4e86d2 testvm: Refactor to use argh
The code has been written before we used argh. The CLI is specified
in tools/testvm. The implementation remains in impl/testvm.py so it
can be shared with run_tests.py for automatically managing the VM
when running tests.

BUG=b:275717759
TEST=x86vm run/up/wait/stop
TEST=run_tests --dut=vm

Change-Id: I2bdb554e7ed17a9f397fd8fb02f754e4ec1e52d7
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4390729
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zihan Chen <zihanchen@google.com>
2023-04-11 20:30:26 +00:00
Dennis Kempin
78f62a44e7 Update copyright header check to cover all files
generated files and a list of excluded files are skipped.
Others are fixed to include the missing header.

BUG=b:246579983
TEST=./tools/health-check --all copyright_header

Change-Id: I13e9bf79df18789f1ed4b83fc47c0c2e080d70a8
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3894240
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-13 18:41:29 +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
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