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>
The Cargo.lock file has been source of much annoyance and does not
really serve it's purpose in crosvm anyway. Both Android and ChromeOS
builds will not use Cargo.lock files but use their own infra to pin
dependencies to fixed versions.
Cargo.lock files are only used for development builds, but can cause
frequent merge issues, especially once our hacky 'setup_cros_cargo.sh'
script is involed.
Since we are planning to migrate towards bazel in the not-so-far future,
the easiest short term plan is to just remove Cargo.lock from version
control and deal with potential discrepancies in development builds.
BUG=None
TEST=None
Change-Id: I23736a61a4cc8131888d5ee2c19793066267f608
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3140584
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
These folders can be created to store local settings.
BUG=None
TEST=.vscode content does not appear with `git status`
Change-Id: I7b6c1b1bdb93ecbadc6e25b5fe9c9ecdbb4a3f0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2842604
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This CL fixes some of the issues that prevented the
test system from running on other workstations.
- Builders run by Kokoro will not use a scratch mount.
It's not needed, and will cause issues if stored on
/tmp with noexec set.
- Running podman with label=disable to prevent selinux
issues.
The run_tests implementation has been moved to a separate
file and updated with parsing of cargo test output. This
allows simpler test output and integration with the
test results UI in sponge.
The sponge test UI can make it much easier to see which
tests failed, and to find the log of that test case.
This CL also includes an ./ci/kokoro/uprev script to
uprev the manifest versions. And runs the uprev.
BUG=b:174861002
TEST=Tested by forcing a kokoro build with this CL
Change-Id: I0cba9bb68915e2558a4ea6061dd9ba0a7050421b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2669712
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
One script to run coverage for the whole smoke test suite,
the resulting file can be uploaded to codecov.io for consumption:
https://codecov.io/gh/denniskempin/crosvm
Another script to run tests + coverage for a single crate,
which is useful during development to keep track of coverage
while adding tests (IDEs can display the generated lcov.info file)
BUG=b:171082843
TEST=Manual testing of both scripts
Change-Id: I52384762400a146cb0e7deb3d54dccf59b6134db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2492914
Reviewed-by: Zach Reizner <zachr@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Auto-Submit: Dennis Kempin <denniskempin@google.com>
Cargo.lock will need to be checked in to ensure reproducible builds.
However continue to ignore Cargo.lock in subdirectories as the main Cargo.lock
shouls dictate the versions of everything.
Change-Id: I448527b3c23bb9de939682ec1a78fd06a2530857
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/538067
Reviewed-by: Zach Reizner <zachr@chromium.org>
These bindings are autogenerated via a manual invocation to bindgen.
Also included are the calculations for ioctl numbers, which bindgen was
not capable of generating. Note that a few of the autogenerated tests
fail currently.
BUG=chromium:711556
TEST=cargo test # note there are 4 failures
Change-Id: I818c5bba1f032aec131459de1346c548148e6612
Reviewed-on: https://chromium-review.googlesource.com/477375
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>