mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
18724772c2
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>
140 lines
4 KiB
TOML
140 lines
4 KiB
TOML
[package]
|
|
name = "crosvm"
|
|
version = "0.1.0"
|
|
authors = ["The Chromium OS Authors"]
|
|
edition = "2018"
|
|
default-run = "crosvm"
|
|
|
|
[lib]
|
|
path = "src/crosvm.rs"
|
|
|
|
[[bin]]
|
|
name = "crosvm"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "crosvm-direct"
|
|
path = "src/main.rs"
|
|
required-features = [ "direct" ]
|
|
|
|
[profile.release]
|
|
panic = 'abort'
|
|
overflow-checks = true
|
|
|
|
# We currently need to exclude some crates from the workspace to allow
|
|
# these crates to be independently built by portage. These crates will
|
|
# eventually be moved into separate repositories.
|
|
# The only workspace members that need to be explicitly specified here are those
|
|
# that are not dependencies of the crosvm root crate.
|
|
[workspace]
|
|
members = [
|
|
"fuzz",
|
|
"qcow_utils",
|
|
"integration_tests",
|
|
"libcrosvm_control",
|
|
]
|
|
exclude = [
|
|
"assertions",
|
|
"base",
|
|
"cros_async",
|
|
"data_model",
|
|
"sync",
|
|
"sys_util",
|
|
"tempfile",
|
|
"vm_memory",
|
|
"audio_streams",
|
|
]
|
|
|
|
[features]
|
|
all-linux = [
|
|
# TODO(b/203105868): Enable remaining features on linux builds.
|
|
"composite-disk",
|
|
"default",
|
|
"gdb",
|
|
"tpm",
|
|
"virgl_renderer_next",
|
|
"virgl_renderer",
|
|
"x",
|
|
]
|
|
audio = ["devices/audio"]
|
|
audio_cras = ["devices/audio_cras"]
|
|
chromeos = ["base/chromeos", "audio_cras", "devices/chromeos"]
|
|
composite-disk = ["protos/composite-disk", "protobuf", "disk/composite-disk"]
|
|
default = ["audio", "gpu", "usb"]
|
|
default-no-sandbox = []
|
|
direct = ["devices/direct"]
|
|
gdb = ["gdbstub", "gdbstub_arch", "arch/gdb", "vm_control/gdb", "x86_64/gdb"]
|
|
gfxstream = ["devices/gfxstream"]
|
|
gpu = ["devices/gpu"]
|
|
plugin = ["protos/plugin", "crosvm_plugin", "kvm", "kvm_sys", "protobuf"]
|
|
power-monitor-powerd = ["arch/power-monitor-powerd"]
|
|
tpm = ["devices/tpm"]
|
|
usb = ["devices/usb"]
|
|
video-decoder = ["devices/video-decoder"]
|
|
video-encoder = ["devices/video-encoder"]
|
|
virgl_renderer = ["devices/virgl_renderer"]
|
|
virgl_renderer_next = ["rutabaga_gfx/virgl_renderer_next"]
|
|
wl-dmabuf = ["devices/minigbm"]
|
|
x = ["devices/x"]
|
|
|
|
[dependencies]
|
|
arch = { path = "arch" }
|
|
assertions = { path = "assertions" }
|
|
audio_streams = "*"
|
|
base = "*"
|
|
bit_field = { path = "bit_field" }
|
|
crosvm_plugin = { path = "crosvm_plugin", optional = true }
|
|
data_model = "*"
|
|
devices = { path = "devices" }
|
|
disk = { path = "disk" }
|
|
enumn = { path = "enumn" }
|
|
gdbstub = { version = "0.5.0", optional = true }
|
|
gdbstub_arch = { version = "0.1.0", optional = true }
|
|
rutabaga_gfx = { path = "rutabaga_gfx"}
|
|
hypervisor = { path = "hypervisor" }
|
|
kernel_cmdline = { path = "kernel_cmdline" }
|
|
kernel_loader = { path = "kernel_loader" }
|
|
kvm = { path = "kvm", optional = true }
|
|
kvm_sys = { path = "kvm_sys", optional = true }
|
|
libc = "0.2.93"
|
|
libcras = "*"
|
|
minijail = "*" # provided by ebuild
|
|
net_util = { path = "net_util" }
|
|
p9 = "*"
|
|
protobuf = { version = "2.3", optional = true }
|
|
protos = { path = "protos", optional = true }
|
|
remain = "*"
|
|
resources = { path = "resources" }
|
|
serde_json = "*"
|
|
sync = { path = "sync" }
|
|
tempfile = "3"
|
|
thiserror = { version = "1.0.20" }
|
|
vhost = { path = "vhost" }
|
|
vm_control = { path = "vm_control" }
|
|
acpi_tables = { path = "acpi_tables" }
|
|
vm_memory = { path = "vm_memory" }
|
|
|
|
[target.'cfg(target_arch = "x86_64")'.dependencies]
|
|
x86_64 = { path = "x86_64" }
|
|
|
|
[target.'cfg(any(target_arch = "aarch64", target_arch = "arm"))'.dependencies]
|
|
aarch64 = { path = "aarch64" }
|
|
|
|
[dev-dependencies]
|
|
base = "*"
|
|
|
|
[patch.crates-io]
|
|
assertions = { path = "assertions" }
|
|
audio_streams = { path = "audio_streams" }
|
|
base = { path = "base" }
|
|
cros_async = { path = "cros_async" }
|
|
cros_fuzz = { path = "common/cros-fuzz" } # ignored by ebuild
|
|
data_model = { path = "data_model" }
|
|
libcras = { path = "libcras_stub" } # ignored by ebuild
|
|
p9 = { path = "common/p9" } # ignored by ebuild
|
|
sync = { path = "sync" }
|
|
sys_util = { path = "sys_util" }
|
|
system_api = { path = "system_api_stub" } # ignored by ebuild
|
|
wire_format_derive = { path = "common/p9/wire_format_derive" } # ignored by ebuild
|
|
minijail = { path = "third_party/minijail/rust/minijail" } # ignored by ebuild
|
|
vmm_vhost = { path = "third_party/vmm_vhost", features = ["vhost-user-master", "vhost-user-slave"] } # ignored by ebuild
|