• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# Copyright 2021 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5#
6# Runs tests for crosvm.
7#
8# See `ci/README.md` or `./run_tests -h` for more details.
9
10from typing import List, Dict
11from ci.test_runner import Requirements, main
12
13# A list of all crates and their requirements
14# See ci/test_runner.py for documentation on the requirements
15CRATE_REQUIREMENTS: Dict[str, List[Requirements]] = {
16    "aarch64": [Requirements.AARCH64],
17    "acpi_tables": [],
18    "arch": [],
19    "assertions": [],
20    "base": [],
21    "bit_field": [],
22    "bit_field_derive": [],
23    "cros_async": [Requirements.DISABLED],
24    "crosvm": [Requirements.DO_NOT_RUN],
25    "crosvm_plugin": [Requirements.X86_64],
26    "data_model": [],
27    "devices": [
28        Requirements.SINGLE_THREADED,
29        Requirements.PRIVILEGED,
30        Requirements.X86_64,
31    ],
32    "disk": [Requirements.PRIVILEGED],
33    "enumn": [],
34    "fuse": [],
35    "fuzz": [Requirements.DISABLED],
36    "gpu_display": [],
37    "hypervisor": [Requirements.PRIVILEGED, Requirements.X86_64],
38    "integration_tests": [Requirements.PRIVILEGED, Requirements.X86_64],
39    "io_uring": [
40        Requirements.SEPARATE_WORKSPACE,
41        Requirements.PRIVILEGED,
42        Requirements.SINGLE_THREADED,
43    ],
44    "kernel_cmdline": [],
45    "kernel_loader": [Requirements.PRIVILEGED],
46    "kvm_sys": [Requirements.PRIVILEGED],
47    "kvm": [Requirements.PRIVILEGED, Requirements.X86_64],
48    "libcrosvm_control": [],
49    "linux_input_sys": [],
50    "net_sys": [],
51    "net_util": [Requirements.PRIVILEGED],
52    "power_monitor": [],
53    "protos": [],
54    "qcow_utils": [],
55    "rand_ish": [],
56    "resources": [],
57    "rutabaga_gfx": [Requirements.CROS_BUILD, Requirements.PRIVILEGED],
58    "sync": [],
59    "sys_util": [Requirements.SINGLE_THREADED, Requirements.PRIVILEGED],
60    "poll_token_derive": [],
61    "tempfile": [],
62    "tpm2-sys": [],
63    "tpm2": [],
64    "usb_sys": [],
65    "usb_util": [],
66    "vfio_sys": [],
67    "vhost": [Requirements.PRIVILEGED],
68    "virtio_sys": [],
69    "vm_control": [],
70    "vm_memory": [Requirements.PRIVILEGED],
71    "x86_64": [Requirements.X86_64, Requirements.PRIVILEGED],
72}
73
74# Just like for crates, lists requirements for each cargo feature flag.
75FEATURE_REQUIREMENTS: Dict[str, List[Requirements]] = {
76    "chromeos": [],
77    "audio": [],
78    "gpu": [Requirements.CROS_BUILD],
79    "plugin": [Requirements.PRIVILEGED, Requirements.X86_64],
80    "power-monitor-powerd": [],
81    "tpm": [Requirements.CROS_BUILD],
82    "video-decoder": [Requirements.DISABLED],
83    "video-encoder": [Requirements.DISABLED],
84    "wl-dmabuf": [Requirements.DISABLED],
85    "x": [],
86    "virgl_renderer_next": [Requirements.CROS_BUILD],
87    "composite-disk": [],
88    "virgl_renderer": [Requirements.CROS_BUILD],
89    "gfxstream": [Requirements.DISABLED],
90    "gdb": [],
91}
92
93main(CRATE_REQUIREMENTS, FEATURE_REQUIREMENTS)
94