2021-01-14 21:10:31 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# Copyright 2021 The Chromium OS Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
#
|
|
|
|
# Runs tests for crosvm.
|
|
|
|
#
|
2021-02-02 23:18:10 +00:00
|
|
|
# See `ci/README.md` or `./run_tests -h` for more details.
|
2021-01-14 21:10:31 +00:00
|
|
|
|
2021-02-02 23:18:10 +00:00
|
|
|
from typing import List, Dict
|
|
|
|
from ci.test_runner import Requirements, main
|
2021-01-14 21:10:31 +00:00
|
|
|
|
|
|
|
# A list of all crates and their requirements
|
2021-03-11 00:39:46 +00:00
|
|
|
# See ci/test_runner.py for documentation on the requirements
|
2021-01-14 21:10:31 +00:00
|
|
|
CRATE_REQUIREMENTS: Dict[str, List[Requirements]] = {
|
|
|
|
"aarch64": [Requirements.AARCH64],
|
|
|
|
"acpi_tables": [],
|
|
|
|
"arch": [],
|
|
|
|
"assertions": [],
|
|
|
|
"base": [],
|
|
|
|
"bit_field": [],
|
|
|
|
"bit_field_derive": [],
|
2021-07-23 17:06:40 +00:00
|
|
|
"common/cros-fuzz": [Requirements.SEPARATE_WORKSPACE],
|
|
|
|
"common/p9": [Requirements.SEPARATE_WORKSPACE, Requirements.X86_64],
|
2021-01-14 21:10:31 +00:00
|
|
|
"cros_async": [Requirements.DISABLED],
|
2021-02-22 22:40:08 +00:00
|
|
|
"crosvm": [Requirements.DO_NOT_RUN],
|
2021-01-14 21:10:31 +00:00
|
|
|
"crosvm_plugin": [Requirements.X86_64],
|
|
|
|
"data_model": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"devices": [
|
|
|
|
Requirements.SINGLE_THREADED,
|
|
|
|
Requirements.PRIVILEGED,
|
|
|
|
Requirements.X86_64,
|
|
|
|
],
|
2021-03-09 00:39:31 +00:00
|
|
|
"disk": [Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"enumn": [],
|
|
|
|
"fuse": [],
|
|
|
|
"fuzz": [Requirements.DISABLED],
|
|
|
|
"gpu_display": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"hypervisor": [Requirements.PRIVILEGED, Requirements.X86_64],
|
2021-03-11 20:40:42 +00:00
|
|
|
"integration_tests": [Requirements.PRIVILEGED, Requirements.X86_64],
|
2021-03-11 00:39:46 +00:00
|
|
|
"io_uring": [
|
|
|
|
Requirements.SEPARATE_WORKSPACE,
|
|
|
|
Requirements.PRIVILEGED,
|
|
|
|
Requirements.SINGLE_THREADED,
|
|
|
|
],
|
2021-01-14 21:10:31 +00:00
|
|
|
"kernel_cmdline": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"kernel_loader": [Requirements.PRIVILEGED],
|
|
|
|
"kvm_sys": [Requirements.PRIVILEGED],
|
|
|
|
"kvm": [Requirements.PRIVILEGED, Requirements.X86_64],
|
2021-03-18 11:41:23 +00:00
|
|
|
"libcrosvm_control": [],
|
2021-01-14 21:10:31 +00:00
|
|
|
"linux_input_sys": [],
|
|
|
|
"net_sys": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"net_util": [Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"power_monitor": [],
|
|
|
|
"protos": [],
|
|
|
|
"qcow_utils": [],
|
|
|
|
"resources": [],
|
2021-09-02 23:00:07 +00:00
|
|
|
"rutabaga_gfx": [Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"sync": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"sys_util": [Requirements.SINGLE_THREADED, Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"poll_token_derive": [],
|
|
|
|
"tempfile": [],
|
|
|
|
"tpm2-sys": [],
|
|
|
|
"tpm2": [],
|
|
|
|
"usb_sys": [],
|
|
|
|
"usb_util": [],
|
|
|
|
"vfio_sys": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"vhost": [Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"virtio_sys": [],
|
|
|
|
"vm_control": [],
|
2021-03-11 21:25:19 +00:00
|
|
|
"vm_memory": [Requirements.PRIVILEGED],
|
2021-01-21 19:06:44 +00:00
|
|
|
"x86_64": [Requirements.X86_64, Requirements.PRIVILEGED],
|
2021-01-14 21:10:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Just like for crates, lists requirements for each cargo feature flag.
|
|
|
|
FEATURE_REQUIREMENTS: Dict[str, List[Requirements]] = {
|
2021-06-23 18:34:31 +00:00
|
|
|
"chromeos": [Requirements.DISABLED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"audio": [],
|
2021-09-02 23:00:07 +00:00
|
|
|
"gpu": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"plugin": [Requirements.PRIVILEGED, Requirements.X86_64],
|
2021-07-23 20:22:39 +00:00
|
|
|
"power-monitor-powerd": [Requirements.DISABLED],
|
2021-09-02 23:00:07 +00:00
|
|
|
"tpm": [],
|
2021-01-14 21:10:31 +00:00
|
|
|
"video-decoder": [Requirements.DISABLED],
|
|
|
|
"video-encoder": [Requirements.DISABLED],
|
2021-01-21 19:06:44 +00:00
|
|
|
"wl-dmabuf": [Requirements.DISABLED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"x": [],
|
2021-09-02 23:00:07 +00:00
|
|
|
"virgl_renderer_next": [],
|
2021-01-14 21:10:31 +00:00
|
|
|
"composite-disk": [],
|
2021-09-02 23:00:07 +00:00
|
|
|
"virgl_renderer": [],
|
2021-01-21 19:06:44 +00:00
|
|
|
"gfxstream": [Requirements.DISABLED],
|
2021-01-14 21:10:31 +00:00
|
|
|
"gdb": [],
|
|
|
|
}
|
|
|
|
|
2021-02-02 23:18:10 +00:00
|
|
|
main(CRATE_REQUIREMENTS, FEATURE_REQUIREMENTS)
|