Daniel Erat | 599e024 | 2018-09-15 00:52:55 | [diff] [blame] | 1 | # Tast Test Dependencies (go/tast-deps) |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 2 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 3 | A test may specify software or hardware features that must be supported on the DUT |
| 4 | in order for the test to run successfully. If one or more features aren't |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 5 | supported by the DUT, the test will usually be skipped. See the `tast` command's |
| 6 | `-checktestdeps` flag to control this behavior. |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 7 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 8 | Tests specify dependencies through the `SoftwareDeps` and `HardwareDeps` fields in [testing.Test]. |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 9 | |
Seewai Fu | d948221 | 2023-04-25 01:50:57 | [diff] [blame] | 10 | [testing.Test]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/go.chromium.org/tast/core/testing#Test |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 11 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 12 | ## Software dependencies |
| 13 | |
| 14 | ### Existing features |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 15 | |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 16 | The following software features are defined: |
| 17 | |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 18 | * `amd64` - The [amd64] processor architecture. |
| 19 | * `amd_cpu` - Boards that contain an AMD application processor. |
Josh Horwich | 109eb65 | 2023-09-20 20:25:28 | [diff] [blame] | 20 | * `android_container` - The ability to [run Android apps] in a container instead |
| 21 | of a VM. Prefer this over `android_container_r` if possible. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 22 | * `android_vm` - The ability to [run Android apps] in VM instead of container. |
Satoshi Niwa | 9312529 | 2024-08-14 09:13:45 | [diff] [blame] | 23 | Any version of Android T+ can be used. Prefer this over `android_vm_t` if possible. |
| 24 | * `android_p` - The ability to [run Android apps] that require Android P. (Android P always runs in container.) |
| 25 | * `android_container_r` - The ability to [run Android apps] that require Android R. (Android R always runs in container.) |
| 26 | * `android_vm_t` - The ability to [run Android apps] that require Android T. (Android T always runs in VM.) |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 27 | * `arc` - The ability to [run Android apps] in any way, in VM or container, |
Yusuke Sato | 2e203bd | 2020-02-20 00:41:32 | [diff] [blame] | 28 | with any Android version. This is intended to be used to run non-ARC tests |
| 29 | only when ARC is supported on the board. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 30 | * `arc32` - Runs 32-bit Android primary ABI. |
| 31 | * `arc64` - Runs 64-bit Android primary ABI, may or may not have 32-bit support. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 32 | * `arc_camera3` - Using [Camera HAL3] interface in Chrome and Android. |
| 33 | * `arc_launched_32bit` - This platform originally launched with 32-bit Android. |
| 34 | * `arc_launched_64bit` - This platform originally launched with 64-bit Android. |
Benjamin Gordon | 555eeb5 | 2024-08-19 18:36:27 | [diff] [blame] | 35 | * `arc_print_stable` Boards that can run Android printing tests without flakes. |
Momoko Hattori | 04eb865 | 2023-12-21 05:23:27 | [diff] [blame] | 36 | * `arcvm_data_migration` - Boards with ARCVM /data migration enabled. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 37 | * `arm` - The [arm] 32 and 64 bit processor architecture. |
| 38 | * `aslr` - Address space layout randomization, which mitigates buffer-overflow |
Eric Caruso | 6ca58ce | 2018-12-04 00:38:38 | [diff] [blame] | 39 | attacks, is functional (this is not true for builds with [AddressSanitizer] |
| 40 | instrumentation built in). |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 41 | * `auto_update_stable` - No suffix like -kernelnext and -arc-r in the board name. |
Yi Xie | 397d515 | 2022-05-12 06:02:52 | [diff] [blame] | 42 | Auto update to a stable version is possible. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 43 | * `autotest-capability:foo` - An [Autotest capability] named `foo`. See below. |
| 44 | * `biometrics_daemon` - The ability to process fingerprint authentication. |
Yicheng Li | 70d8cc3 | 2019-06-05 21:09:07 | [diff] [blame] | 45 | This implies the presence of the `biod` package. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 46 | * `boot_perf_info` - Reven (ChromeOS Flex) doesn't support boot performance metrics. |
| 47 | * `borealis_host` - Boards that can host the Borealis system. |
Fei Shao | 664926b | 2023-08-04 06:16:37 | [diff] [blame] | 48 | * `borealis_nvidia` - Boards that use nvidia supported Borealis system. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 49 | * `bpf` - Whether the platform (kernel) has the bpf syscall enabled. |
| 50 | * `breakpad` - Whether the platform supports the breakpad crash handler |
Ian Barkley-Yeung | 3ff970d | 2020-01-17 03:59:33 | [diff] [blame] | 51 | for Chrome. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 52 | * `camera_720p` - The ability to capture video with frame size 1280x720. |
| 53 | * `camera_app` - The ability to run the builtin camera app. |
| 54 | * `camera_feature_auto_framing` - Whether Auto Framing is enabled on this platform. |
| 55 | * `camera_feature_effects` - Whether camera effects are enabled on this platform. |
| 56 | * `camera_feature_hdrnet` - Whether HDRnet is enabled on this platform. |
| 57 | * `camera_feature_portrait_mode` - Whether Portrait Mode is enabled on this platform. |
Juliana Chang | cfcaf82 | 2024-03-25 12:15:09 | [diff] [blame] | 58 | * `camera_feature_super_res` - Whether single frame super resolution is enabled on this platform. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 59 | * `cert_provision` - The ability to use an additional cert_provision library |
Yi Chou | 4e6cf3b | 2020-10-29 08:42:53 | [diff] [blame] | 60 | that supports an interface for provisioning machine-wide certificates and |
| 61 | using them for signing data on top of cryptohome dbus interface. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 62 | * `chrome` - Support for performing user login via Chrome (i.e. using |
Daniel Erat | 75160d4 | 2019-05-15 20:18:09 | [diff] [blame] | 63 | `session_manager` and `cryptohome`). This also implies that the |
| 64 | [chromeos-chrome] Portage package is installed (which also installs Chrome |
| 65 | binary tests), and that the `ui` Upstart job is present. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 66 | * `chromeless` - Explicit *lack* of support for login via Chrome. |
| 67 | * `chromeos_firmware` - Boards that use ChromeOS firmware. |
| 68 | * `chromeos_kernelci` - Whether the image built for https://chromeos.kernelci.org/ or not. |
| 69 | * `chrome_internal` - Functionality that is only available in internal builds |
Madhulika | 2955f68 | 2020-05-18 18:42:45 | [diff] [blame] | 70 | of Chrome (e.g. official branding). Any test that specifies this dependency |
| 71 | should also explicitly specify a `chrome` dependency. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 72 | * `coresched` - Whether device supports core scheduling feature for secure HT. |
| 73 | * `cpuidle_teo` - Availability of the TEO cpuidle governor. |
Pattara Teerapong | 6a8a172 | 2023-05-03 09:57:00 | [diff] [blame] | 74 | * `cpu_heterogeneous` - Whether device has heterogeneous CPU topology. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 75 | * `cpu_vuln_sysfs` - Whether the platform has /sys/devices/system/cpu/vulnerabilities sysfs files |
| 76 | * `cras` - Whether the platform supports the ChromeOS Audio Server. |
| 77 | * `crashpad` - Whether the platform supports the crashpad crash handler for |
Ian Barkley-Yeung | 9e7307a | 2020-03-03 03:42:11 | [diff] [blame] | 78 | Chrome. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 79 | * `cros_internal` - Functionality that is only available in internal builds of |
Jesse McGuire | 84c0970 | 2022-05-06 23:17:29 | [diff] [blame] | 80 | ChromeOS (i.e. ones built using `chromeos-overlay`). |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 81 | * `crossystem` - ChromeOS firmware/system interface utility. |
| 82 | * `crostini_stable` - Boards that can run Crostini tests reliably. |
| 83 | * `crostini_unstable` - Boards that cannot run Crostini tests reliably. |
| 84 | * `crosvm_gpu` - Boards that use hardware GPU acceleration in the guest VM environment. |
| 85 | * `crosvm_no_gpu` - Boards that use software GPU emulation in the guest VM environment. |
George Engelbrecht | b2888fc | 2023-06-28 21:57:55 | [diff] [blame] | 86 | * `crosvm_swap` - Boards that have crosvm's vmm-swap feature enabled. |
Reka Norman | 497b3c5 | 2023-11-09 01:34:58 | [diff] [blame] | 87 | * `csme_update` - Intel boards with updateable CSME firmware (volteer/dedede |
| 88 | onwards) |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 89 | * `cups` - CUPS daemon. |
| 90 | * `device_crash` - Boards that can recover gracefully after a hard crash (e.g. |
Miriam Zimmerman | 23fa220 | 2020-11-03 23:35:00 | [diff] [blame] | 91 | kernel crash) |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 92 | * `diagnostics` - Boards that contain generic cross-platform |
Trent Begin | 4d27476 | 2019-05-29 22:01:57 | [diff] [blame] | 93 | [Diagnostic utilities]. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 94 | * `dlc` - Support of [Downloadable Content] (DLC). |
| 95 | * `dmverity_stable` - Kernels with which dm-verity runs stably. See [b/172227689](https://b.corp.google.com/issues/172227689). |
| 96 | * `dmverity_unstable` - Kernels having known issue of dm-verity causing random crashes. See [b/172227689](https://b.corp.google.com/issues/172227689). |
| 97 | * `dptf` - Support of [Intel Dynamic Platform and Thermal Framework] (DPTF). |
| 98 | * `drivefs` - Google Drive support enabled. |
| 99 | * `drm_atomic` - The [DRM/KMS] kernel subsystem supports atomic commits. |
| 100 | * `drm_trace` - The [DRM/KMS] kernel subsystem supports tracing using tracefs. |
| 101 | * `ec_crash` - Boards that have EC firmware, implement the `crash` EC command, |
Miriam Zimmerman | 23fa220 | 2020-11-03 23:35:00 | [diff] [blame] | 102 | and produce a panicinfo file after a crash. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 103 | * `endorsement` - Whether the system have a valid endorsement certificate. |
| 104 | * `faceauth` - Whether the system has faceauth functionality enabled, go/cros-faceauth. |
| 105 | * `factory_flow`- Device is subject to the [go/chromeos-factory-flow](http://go/chromeos-factory-flow) (e.g. most devices). |
| 106 | * `fake_hps` - Whether the HPS daemon (go/cros-hps) uses a fake software |
Dan Callaghan | 29c250f | 2022-06-27 05:36:27 | [diff] [blame] | 107 | device for testing purposes. |
Abhishek Kumar | c208970 | 2023-12-11 23:37:27 | [diff] [blame] | 108 | * `fbpreprocessord`- Firmware dump processor daemon. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 109 | * `firewall` - Standard ChromeOS network firewall rules. |
| 110 | * `flashrom` - Userspace utility to update firmware. |
Jonathan Denose | 5461d36 | 2024-06-07 17:45:36 | [diff] [blame] | 111 | * `flex_device` - Whether the device is a ChromeOS Flex device |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 112 | * `flex_id` - Enable using [flex_id](http://go/chromeos-flex-id) for enrollment. |
Ting-Hao Lin | 914d828 | 2023-10-30 17:08:16 | [diff] [blame] | 113 | * `flex_internal` - Enable using flex_internal to pull in data (URLs, API keys, etc.) only needed by official Flex releases. |
Jonathan Denose | 5461d36 | 2024-06-07 17:45:36 | [diff] [blame] | 114 | * `flex_hwis` - Enable using flex_hwis for hardware data sending. |
Hyung Tae Kim | 6059209 | 2024-05-06 21:55:37 | [diff] [blame] | 115 | * `gaia` - Support for performing user login via Chrome through Google account service |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 116 | * `ghostscript` - Ghostscript and dependent packages are available for printing. |
| 117 | * `google_virtual_keyboard` - The proprietary Google onscreen virtual keyboard |
Daniel Erat | 0c2e3b8 | 2019-04-15 04:43:52 | [diff] [blame] | 118 | (as opposed to the builtin open-source virtual keyboard). |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 119 | * `gpu_sandboxing` - Chrome's GPU process is [sandboxed]. |
| 120 | * `gsc` - Whether the platform has an onboard Google security chip. |
Kshitij Shah | 867ee8b | 2023-10-25 22:05:10 | [diff] [blame] | 121 | * `has_recovery_mrc_cache` - Boards that have the RECOVERY_MRC_CACHE section. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 122 | * `houdini` - Availability of 32-bit Houdini library for ARC. |
| 123 | * `houdini64` - Availability of 64-bit Houdini library for ARC. |
| 124 | * `hostap_hwsim` - Whether system has the hostap project's test dependencies |
Brian Norris | 012fc90 | 2019-11-07 21:55:13 | [diff] [blame] | 125 | (scripts, daemons) installed and configured appropriately. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 126 | * `hps` - Whether the system has the hps daemon and tools, go/cros-hps. |
| 127 | * `igt` - Boards that can run igt-gpu-tools tests |
| 128 | * `iioservice` - Whether the device has CrOS IIO Service running. |
| 129 | * `inference_accuracy_eval` - Whether the device has inference accuracy evaluation tools installed. |
Kerker Yang | 28d7340 | 2023-06-21 06:58:50 | [diff] [blame] | 130 | * `intel_psr` - Whether Intel PSR (platform service record) is supported or not. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 131 | * `ikev2` - The ability to run an IKEv2 VPN. |
| 132 | * `io_uring` - Whether the platform (kernel) has the io_uring syscalls enabled. |
| 133 | * `iwlwifi_rescan` - Ability to remove/rescan WiFi PCI device when the |
Yen-lin Lai | 0e3065e | 2019-10-14 07:52:32 | [diff] [blame] | 134 | hardware becomes non-responsive. |
Stephen Boyd | bc3c125 | 2023-11-01 18:52:35 | [diff] [blame] | 135 | * `kfence_enabled` - Whether the kernel has kfence (CONFIG_KFENCE) enabled. |
Gwendal Grignou | 17deee3 | 2023-08-23 19:43:59 | [diff] [blame] | 136 | * `known_fixed_ssd` - Set when the fixed SSD location globs are defined. They are not for board:reven (the hardware is not fixed) and VMs, since the path |
| 137 | is either not defined (if taken directly from xxx-generic overlay) or already defined to real hardware location. |
| 138 | Only for betty we do defined a "hardware" path since that board is only used for VM. |
Stephen Boyd | a80660b | 2024-04-24 00:22:59 | [diff] [blame] | 139 | * `kstack_random` - Whether the kernel has randomized kernel stack offsets (CONFIG_RANDOMIZE_KSTACK_OFFSET) enabled. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 140 | * `lacros` - Whether the system supports running [lacros]. |
| 141 | * `lacros_stable` - Whether the system supports running [lacros] and is stable enough for CQ. [TODO: Remove this.](crbug.com/1412276) |
| 142 | * `lacros_unstable` - Whether the system supports running [lacros] and is not stable enough for CQ. [TODO: Remove this.](crbug.com/1412276) |
| 143 | * `landlock_enabled` - Whether the system supports the Landlock Linux Security Module. |
Alec Bargher | 9f5383e | 2024-07-29 20:09:24 | [diff] [blame] | 144 | * `lldb` - The presence of the local `lldb` binary, separate from `lldb-server`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 145 | * `mbo` - WiFi MBO support. |
| 146 | * `memfd_create` - memfd_create function implemented in the kernel. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 147 | * `microcode` - Platforms that have CPU microcode. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 148 | * `ml_benchmark_drivers` - [ML benchmarking suite](http://go/roadrollerda) |
Jim Pollock | bf1edfd | 2023-10-09 02:35:56 | [diff] [blame] | 149 | * `ml_service` - ML Service daemon. |
| 150 | * `ml_tiered_support` - Platforms enabled for tiered benchmarking. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 151 | * `mosys` - Ability to run mosys command. |
| 152 | * `nacl` - Availability of the Native Client sandboxing technology. |
| 153 | * `ndk_translation` - Availability of 32-bit NDK translation library for ARC. |
| 154 | * `ndk_translation64` - Availability of 64-bit NDK translation library for |
Youkichi Hosoi | 9c419b3 | 2020-05-28 01:45:31 | [diff] [blame] | 155 | ARC. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 156 | * `nnapi` - Has the nnapi (libneuralnetworks.so) installed. Run minimal VTS tests. |
| 157 | * `nnapi_vendor_driver` - Run the full VTS / CTS test suite. Ignores VM's. |
| 158 | * `no_android` - The inability to run Android apps. This is the opposite of |
Daniel Erat | 63de30d | 2018-11-20 00:48:34 | [diff] [blame] | 159 | the `android` feature; DUTs will have exactly one of these two features. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 160 | * `no_arm` - The absence of [arm] 32 bit userspace. |
| 161 | * `no_asan` - Build was not built with Address Sanitizer. Similar to `aslr`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 162 | * `no_borealis_host` - Boards which is not designed to host borealis. |
Kam Kwankajornkiet | 6a903b8 | 2024-03-26 06:02:17 | [diff] [blame] | 163 | * `no_camera_feature_super_res` - Whether single frame super resolution is disabled on this platform. |
Fei Shao | 664926b | 2023-08-04 06:16:37 | [diff] [blame] | 164 | * `no_chrome_dcheck` - Chrome/Chromium was not built with dcheck enabld. |
Wenbo Jie | 57a5aca | 2024-02-28 02:42:40 | [diff] [blame] | 165 | * `no_downloads_bind_mount` - Disable Downloads bind mount and migrate files from ~/Downloads to ~/MyFiles/Downloads. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 166 | * `no_eth_loss_on_reboot` - Board does not lose ethernet on reboot. Context: b/178529170 |
Yichen Yu | dd17f87 | 2024-05-28 22:49:41 | [diff] [blame] | 167 | * `no_fbpreprocessord` - Build was not built with `fbpreprocessord`, the firmware dump processor daemon. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 168 | * `no_iioservice` - Build was not built with CrOS IIO Service. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 169 | * `no_msan` - Build was not built with Memory Sanitizer. |
| 170 | * `no_ondevice_handwriting` - Doesn't have on-device handwriting recognition support. Either ml_service is not enabled, or if ml_service doesn't support `ondevice_handwriting`. |
| 171 | * `no_arc_userdebug` - Skip boards that ship ARC userdebug build. |
| 172 | * `no_arc_x86` - Skip on x86 architecture. |
| 173 | * `no_qemu` - For tests not for ChromeOS QEMU images. |
| 174 | * `no_symlink_mount` - Symlink mounting is disabled via the |
Daniel Erat | 9747888 | 2018-11-14 05:54:39 | [diff] [blame] | 175 | `CONFIG_SECURITY_CHROMIUMOS_NO_SYMLINK_MOUNT` kernel option. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 176 | * `no_tablet_form_factor` - The device's primary form factor is not tablet |
| 177 | * `no_tpm2_simulator` - Built was not built with the simulator of Trusted Platform Module supporting TPMv2. |
| 178 | * `no_tpm_dynamic` - Build was not built with dynamic TPM. |
| 179 | * `no_ubsan` - Build was not built with Undefined Behavior Sanitizer. |
| 180 | * `no_vulkan` - Build was not built with [Vulkan] enabled. |
| 181 | * `no_arcvm_virtio_blk_data` - Build was not built with ARCVM virtio-blk /data enabled. |
| 182 | * `no_gsc` - Build was not built with onboard Google security chip support. |
Douglas Anderson | 7b60c37 | 2023-11-01 16:54:23 | [diff] [blame] | 183 | * `nmi_backtrace` - The Linux kernel has support for NMI backtraces. |
Tommy Chiang | b736fca | 2024-11-14 02:51:36 | [diff] [blame] | 184 | * `npu` - Availability of NPU and its related software components to run AI models. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 185 | * `nvme` - Ability to run NVMe software utilities. |
| 186 | * `oci` - The ability to use the `run_oci` program to execute code within |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 187 | [OCI] containers. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 188 | * `ocr` - [Optical Character Recognition Service] daemon. |
| 189 | * `ondevice_document_scanner` - On-device document scanner support in `ml_service` which installed document scanner library in rootfs. |
Wei Lee | 6a2c38b | 2022-07-28 03:46:02 | [diff] [blame] | 190 | This implies `ml_service`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 191 | * `ondevice_document_scanner_rootfs_or_dlc` - On-device document scanner support in `ml_service`. |
Wei Lee | f9c36ef | 2021-08-05 03:43:38 | [diff] [blame] | 192 | This implies `ml_service`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 193 | * `ondevice_grammar` - On-device grammar check support in `ml_service`. |
| 194 | * `ondevice_handwriting` - On-device handwriting recognition support in `ml_service`. |
Dmitry Grebenyuk | 26e08a7 | 2023-10-23 00:05:26 | [diff] [blame] | 195 | * `ondevice_image_content_annotation` - On-device image content annotation support in `ml_service`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 196 | * `ondevice_speech` - On-device speech recognition support in `ml_service`. |
| 197 | * `ondevice_text_suggestions` - On-device txt suggestions support in `ml_service`. |
| 198 | * `pinweaver` - Pinweaver support, either by GSC or Intel CSME. |
ChromeOS Developer | 442a42f | 2021-03-11 06:24:18 | [diff] [blame] | 199 | This implies `ml_service`. |
Shintaro Kawamura | 8a325f0 | 2024-06-26 05:24:35 | [diff] [blame] | 200 | * `pidfd_open` - pidfd_open function implemented in the kernel. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 201 | * `play_store` - Boards where Google Play Store is supported. |
| 202 | * `plugin_vm` - The ability to run Plugin VMs. |
| 203 | * `proprietary_codecs` - Indicates if Chrome supports proprietary video |
Madhulika | 2955f68 | 2020-05-18 18:42:45 | [diff] [blame] | 204 | codecs (e.g. H.264). This is supported by Chrome official builds and Chromium |
| 205 | builds with the |propietary_codecs| build flag set. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 206 | * `protected_content` - Platform has HW backed OEMCrypto implementation for Widevine |
Jeffrey Kardatzke | 3327736 | 2021-02-23 22:48:48 | [diff] [blame] | 207 | L1 HW DRM. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 208 | * `qemu` - For tests exclusive to ChromeOS QEMU images. |
| 209 | * `racc` - Whether [Runtime AVL Compliance Check] is available. |
| 210 | * `reboot` - The ability to reboot reliably during a remote test. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 211 | * `screenshot` - The [screenshot command] can save screenshots. |
| 212 | * `selinux` - An SELinux-enabled board. All Android boards are |
Qijiang Fan | 7ced1b9 | 2018-09-07 04:08:16 | [diff] [blame] | 213 | SELinux-enabled. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 214 | * `selinux_current` - All SELinux-enabled boards except experimental boards. |
Qijiang Fan | 066d266 | 2019-01-10 09:25:12 | [diff] [blame] | 215 | This implies `selinux`. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 216 | * `selinux_experimental` - An experimental SELinux board. An experimental |
Qijiang Fan | 066d266 | 2019-01-10 09:25:12 | [diff] [blame] | 217 | board has `SELINUX=permissive` in `/etc/selinux/config`, thus no policy |
| 218 | will be enforced. This implies `selinux`. |
Allen Webb | 26e7727 | 2023-10-17 21:07:25 | [diff] [blame] | 219 | * `shipping_kernel` - Debug-related kernel configs are not enabled. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 220 | * `smartdim` - Use smart dim to defer the imminent screen dimming. |
| 221 | * `smartctl` - Ability to run smartctl software utility. |
| 222 | * `stack_sampled_metrics` - Ability to run the stack profiler and gather |
Ian Barkley-Yeung | f3cf106 | 2022-10-21 21:08:26 | [diff] [blame] | 223 | stack-sampled metrics. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 224 | * `storage_wearout_detect` - The ability to measure storage device health. |
| 225 | * `tablet_form_factor` - The device's primary form factor is tablet |
torikauffman | 76b7e45 | 2024-06-10 20:17:28 | [diff] [blame] | 226 | * `tast_vm` - The test is running in a VM [managed by chromite](https://chromium.googlesource.com/chromiumos/chromite/+/HEAD/lib/cros_test.py#489). |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 227 | * `tflite_opencl` - Skips boards which have issues with the OpenCL TFLite |
Jake Barnes | e77af2a | 2022-06-28 05:10:10 | [diff] [blame] | 228 | delegate (b/233851820). |
Shik Chen | e39c52b | 2024-06-05 09:46:00 | [diff] [blame] | 229 | * `tflite_intel_openvino` - The availability of TFLite OpenVINO Delegate for NPU. |
Shik Chen | 81b88fc | 2024-04-12 10:49:33 | [diff] [blame] | 230 | * `tflite_mtk_neuron` - The availability of TFLite Neuron Delegate for APU. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 231 | * `thread_safe_libva_backend` - Boards where the LIBVA backend is threadsafe. |
| 232 | * `tpm` - A [Trusted Platform Module] chip. |
| 233 | * `tpm_clear_allowed` - The device's TPM can be cleared. |
| 234 | * `tpm1` - Indicate a Trusted Platform Module supporting TPMv1.2 is available. Note that TPMv2 is not backward compatible. |
| 235 | * `tpm2` - Indicate a Trusted Platform Module supporting TPMv2 is available. |
| 236 | * `tpm2_simulator` - Indicate the simulator of Trusted Platform Module supporting TPMv2 is available. |
| 237 | * `tpm_dynamic` - Indicate the dynamic TPM is available. |
| 238 | * `transparent_hugepage` - [Transparent Hugepage] support in the Linux kernel. |
| 239 | * `unibuild` - The ChromeOS build is a unified build. |
| 240 | * `untrusted_vm` - The ability to run an untrusted VM. |
| 241 | * `usbguard` - The ability to allow or block USB devices based on policy. |
| 242 | * `usb_hid_wake` - The platform will register HID wake events to a usb device. |
| 243 | * `use_fscrypt_v1` - The board is set to use v1 fscrypt policy for user vault. |
| 244 | * `use_fscrypt_v2` - The board is set to use v2 fscrypt policy for user vault. |
| 245 | * `uvc_compliant` - The board has a UVC driver that is V4L2 compliant. |
| 246 | * `v4l2_codec` - Whether or not v4l2 video acceleration API is supported by this DUT. |
| 247 | * `vaapi` - Whether or not VA-API is supported by this DUT. |
| 248 | * `video_cards_ihd` - Boards that use the Intel Media Driver (also known as iHD) for VA-API. |
| 249 | * `video_decoder_direct` - The platform uses the VideoDecoder (VD) by default. |
| 250 | * `video_decoder_legacy` - The platform used the VideoDecodeAccelerator (VDA) by default. |
| 251 | * `video_decoder_legacy_supported` - Is the VDA is supported on this platform. |
| 252 | * `video_overlays` - The kernel [DRM/KMS] version atomic commits and the underlying hardware display controller support the NV12 DRM Plane format needed to promote videos to [hardware overlays]. |
Brandon Pollack | 9e1420d | 2023-05-19 04:28:23 | [diff] [blame] | 253 | * `virtual_multidisplay` - The platform supports virtual multi display testing (at the time of writing, only 6.1+ betty boards). This should be depended on for all multidisplay presubmit tests to run on betty. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 254 | * `virtual_susupend_time_injection` - The platform supports KVM virtual suspend time injection. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 255 | * `vm_host` - The ability to [run virtual machines]. |
| 256 | * `vpd` - The DUT has a VPD chip. |
Brian Ho | f355292 | 2023-07-26 14:17:28 | [diff] [blame] | 257 | * `vulkan` - Whether [Vulkan] libraries are installed on the system image. |
| 258 | * `vulkan_composite` - Boards that support composition with [Vulkan]. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 259 | * `watchdog` - watchdog daemon |
| 260 | * `wifi` - If this DUT has WiFi device. |
| 261 | * `wpa3_sae` - The ability to use WPA3-SAE authentication for WiFi. |
| 262 | * `wilco` - If this DUT is a [wilco] device. These features include |
Trent Begin | 4d27476 | 2019-05-29 22:01:57 | [diff] [blame] | 263 | the DTC (Diagnostic and Telemetry Controller) VM, a special EC interface, |
| 264 | and a dock firmware updater. |
Jared Bennett | c73c68e | 2023-04-11 23:31:31 | [diff] [blame] | 265 | * `wireguard` - The ability to run a WireGuard VPN. |
| 266 | * `no_kernel_upstream` - Skip boards with continuously-rebased kernel. |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 267 | |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 268 | [amd64]: https://en.wikipedia.org/wiki/X86-64 |
Hirokazu Honda | a5a0660 | 2020-01-30 04:44:17 | [diff] [blame] | 269 | [arm]: https://en.wikipedia.org/wiki/ARM_architecture |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 270 | [run Android apps]: https://developer.android.com/topic/arc/ |
| 271 | [Camera HAL3]: https://source.android.com/devices/camera/camera3 |
Ren-Pei Zeng | baf46f2 | 2019-11-01 12:13:53 | [diff] [blame] | 272 | [Camera HAL1]: https://source.android.com/devices/camera#architecture-legacy |
| 273 | [Linux Video Capture]: https://chromium.googlesource.com/chromium/src/+/HEAD/media/capture/video/linux/ |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 274 | [AddressSanitizer]: https://github.com/google/sanitizers/wiki/AddressSanitizer |
Greg Edelston | d71f987 | 2021-01-05 17:38:50 | [diff] [blame] | 275 | [Autotest capability]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/chromeos-base/autotest-capability-default/ |
| 276 | [chromeos-chrome]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild |
David Staessens | 8302f56 | 2019-10-04 03:53:42 | [diff] [blame] | 277 | [media::VideoDecoder]: https://cs.chromium.org/chromium/src/media/base/video_decoder.h |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 278 | [Diagnostic utilities]: https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/diagnostics/README.md |
| 279 | [Downloadable Content]: https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/dlcservice |
Miguel Casas | 97c357f | 2020-02-28 21:31:37 | [diff] [blame] | 280 | [DRM/KMS]: https://www.kernel.org/doc/Documentation/gpu/drm-kms.rst |
| 281 | [hardware overlays]: https://en.wikipedia.org/wiki/Hardware_overlay |
Puthikorn Voravootivat | 6035d9a | 2020-05-21 22:50:59 | [diff] [blame] | 282 | [Intel Dynamic Platform and Thermal Framework]: https://01.org/intel%C2%AE-dynamic-platform-and-thermal-framework-dptf-chromium-os |
Laurent Chavey | 1c1362f | 2021-02-17 02:56:43 | [diff] [blame] | 283 | [lacros]: https://chromium.googlesource.com/chromium/src.git/+/HEAD/docs/lacros.md |
torikauffman | 76b7e45 | 2024-06-10 20:17:28 | [diff] [blame] | 284 | [sandboxed]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux/sandboxing.md |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 285 | [OCI]: https://www.opencontainers.org/ |
Efi Mavroudi | 186f9b3 | 2020-08-13 00:19:13 | [diff] [blame] | 286 | [Optical Character Recognition Service]: https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/ocr/README.md |
Greg Edelston | d71f987 | 2021-01-05 17:38:50 | [diff] [blame] | 287 | [Runtime AVL Compliance Check]: https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/main/runtime_probe/README.md |
| 288 | [screenshot command]: https://chromium.googlesource.com/chromiumos/platform2/+/main/screen-capture-utils/ |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 289 | [Trusted Platform Module]: https://en.wikipedia.org/wiki/Trusted_Platform_Module |
| 290 | [Transparent Hugepage]: https://www.kernel.org/doc/Documentation/vm/transhuge.txt |
torikauffman | 76b7e45 | 2024-06-10 20:17:28 | [diff] [blame] | 291 | [run virtual machines]: https://www.chromium.org/chromium-os/developer-library/guides/containers/containers-and-vms/ |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 292 | [Vulkan]: https://www.khronos.org/vulkan/ |
torikauffman | 76b7e45 | 2024-06-10 20:17:28 | [diff] [blame] | 293 | [virtual-usb-printer-readme]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/virtual-usb-printer/virtual_usb_printer/README.md |
Trent Begin | 4d27476 | 2019-05-29 22:01:57 | [diff] [blame] | 294 | [wilco]: https://sites.google.com/corp/google.com/wilco/home |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 295 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 296 | ### New features |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 297 | |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 298 | Features should be descriptive and precise. Consider a hypothetical test that |
| 299 | exercises authentication using a biometrics daemon that isn't present in system |
| 300 | images built to run on virtual machines. Instead of adding a `real_hardware` or |
| 301 | `non_vm` feature that is overly broad and will likely be interpreted as carrying |
| 302 | additional meaning beyond the original intent, add a `biometrics_daemon` feature |
| 303 | that precisely communicates the test's actual requirement. |
| 304 | |
Hidehiko Abe | 25cadea | 2020-09-03 05:31:32 | [diff] [blame] | 305 | Features are composed from USE flags and board names, which are statically |
Sean Carpenter | 0e68eb1 | 2023-09-20 17:48:33 | [diff] [blame] | 306 | defined when the system image is built. As an example, the USE flags for Brya |
| 307 | devices are defined in [make.defaults]. [software_defs.go] lists boolean |
Hidehiko Abe | 25cadea | 2020-09-03 05:31:32 | [diff] [blame] | 308 | expressions that are used to generate features; for example, an imaginary |
| 309 | feature named `hd_audio` with the expression |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 310 | |
| 311 | ```go |
| 312 | cras && (audio_chipset_a || audio_chipset_b) && !broken_headphone_jack |
| 313 | ``` |
| 314 | |
| 315 | will be reported as available on systems where the `cras` USE flag is set, |
| 316 | either `audio_chipset_a` or `audio_chipset_b` is set, and |
Shuhei Takahashi | df4179c | 2019-11-08 07:04:25 | [diff] [blame] | 317 | `broken_headphone_jack` is explicitly *not* set. |
| 318 | |
Hidehiko Abe | 25cadea | 2020-09-03 05:31:32 | [diff] [blame] | 319 | A feature can depend on board names, too. Another imaginary feature |
| 320 | named `vm_graphics` with the expression |
| 321 | |
| 322 | ```go |
| 323 | "board:betty-pi-arc" |
| 324 | ``` |
| 325 | |
| 326 | will be reported as available on `betty-pi-arc` board only. |
| 327 | |
Shuhei Takahashi | df4179c | 2019-11-08 07:04:25 | [diff] [blame] | 328 | Before a new `USE` flag can be used in an expression, it must be added to `IUSE` |
Brian Norris | 9aba3bb | 2020-01-22 01:18:18 | [diff] [blame] | 329 | in the [tast-use-flags] package. Local changes to the `tast-use-flags` ebuild |
Shuhei Takahashi | df4179c | 2019-11-08 07:04:25 | [diff] [blame] | 330 | have to be pushed to the DUT manually to take effect: |
| 331 | |
| 332 | ``` |
Brian Norris | 5d5b689 | 2023-12-01 01:05:58 | [diff] [blame] | 333 | cros workon --board=${BOARD} start chromeos-base/tast-use-flags |
| 334 | emerge-${BOARD} chromeos-base/tast-use-flags |
| 335 | cros deploy ${HOST} chromeos-base/tast-use-flags |
Shuhei Takahashi | df4179c | 2019-11-08 07:04:25 | [diff] [blame] | 336 | ``` |
| 337 | |
| 338 | When submitting changes to add new `USE` flags to the [tast-use-flags] package, |
| 339 | please use [Cq-Depend] in your commit messages to ensure that changes land in |
| 340 | the correct order. |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 341 | |
| 342 | If you're having trouble finding a way to specify your test's dependencies, |
| 343 | please ask for help on the [tast-users mailing list]. |
| 344 | |
Sean Carpenter | 0e68eb1 | 2023-09-20 17:48:33 | [diff] [blame] | 345 | [make.defaults]: https://chromium.googlesource.com/chromiumos/overlays/board-overlays/+/main/overlay-brya/profiles/base/make.defaults |
Seewai Fu | 85c8e4d | 2023-05-31 23:46:38 | [diff] [blame] | 346 | [software_defs.go]: https://chromium.googlesource.com/chromiumos/platform/tast/+/main/src/go.chromium.org/tast/core/internal/crosbundle/software_defs.go |
Greg Edelston | d71f987 | 2021-01-05 17:38:50 | [diff] [blame] | 347 | [tast-use-flags]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/main/chromeos-base/tast-use-flags/ |
torikauffman | 76b7e45 | 2024-06-10 20:17:28 | [diff] [blame] | 348 | [Cq-Depend]: https://www.chromium.org/chromium-os/developer-library/guides/development/contributing/#cl-dependencies |
Mark Hasemeyer | b5c9e67 | 2022-08-25 22:15:54 | [diff] [blame] | 349 | [tast-users mailing list]: https://groups.google.com/a/chromium.org/g/tast-users |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 350 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 351 | #### Example changes |
Daniel Erat | a341383 | 2019-01-31 23:43:32 | [diff] [blame] | 352 | |
Daniel Erat | 920fc65 | 2018-12-19 16:11:22 | [diff] [blame] | 353 | See the following changes for an example of adding a new `containers` software |
| 354 | feature based on the `containers` USE flag and making a test depend on it: |
| 355 | |
| 356 | * `chromiumos-overlay` repository: <https://crrev.com/c/1382877> |
| 357 | * `tast` repository: <https://crrev.com/c/1382621> |
| 358 | * `tast-tests` repository: <https://crrev.com/c/1382878> |
| 359 | |
Daniel Erat | e4ea299 | 2019-04-13 01:28:45 | [diff] [blame] | 360 | (Note that the `containers` feature has since been renamed to `oci`.) |
| 361 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 362 | ### autotest-capability |
Daniel Erat | a341383 | 2019-01-31 23:43:32 | [diff] [blame] | 363 | |
Daniel Erat | 673ebab | 2019-02-13 05:32:46 | [diff] [blame] | 364 | There are also `autotest-capability:`-prefixed features, which are added by the |
| 365 | [autocaps package] as specified by YAML files in |
Daniel Erat | df04ea0 | 2018-09-19 21:31:24 | [diff] [blame] | 366 | `/usr/local/etc/autotest-capability`. This exists in order to support porting |
| 367 | existing Autotest-based video tests to Tast. Do not depend on capabilities from |
| 368 | outside of video tests. |
| 369 | |
Seewai Fu | d678a7c | 2023-04-21 17:55:02 | [diff] [blame] | 370 | [autocaps package]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/go.chromium.org/tast/core/autocaps/ |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 371 | |
| 372 | |
| 373 | ## Hardware dependencies |
| 374 | |
| 375 | Tast provides a way to run/skip tests based on the device characteristics. |
Tatsuhisa Yamaguchi | d857bb1 | 2021-03-29 04:35:44 | [diff] [blame] | 376 | |
| 377 | Note that "device characteristics" here only consists of information that can |
| 378 | be determined solely based on the DUT, without depending on the other |
| 379 | surrounding environment, such as some config files on DUT. |
| 380 | |
Hidehiko Abe | 93f747d | 2020-03-30 06:54:02 | [diff] [blame] | 381 | The examples of the device characteristics are as follows: |
| 382 | |
| 383 | * Whether the device has a touch screen. |
| 384 | * Whether the device has fingerprint. |
| 385 | * Whether the device has an internal display. |
| 386 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 387 | For example, in order to run tests on DUT where touchscreen is available, |
| 388 | the dependency can be declared in the `HardwareDeps` field of `testing.Test`. |
| 389 | |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 390 | ```go |
| 391 | func init() { |
| 392 | testing.AddTest(&testing.Test{ |
| 393 | ... |
| 394 | HardwareDeps: hwdep.D(hwdep.Touchscreen()), |
| 395 | ... |
| 396 | }) |
| 397 | } |
| 398 | ``` |
| 399 | |
| 400 | You can provide multiple `Condition`s to `hwdep.D`. In the case, |
| 401 | the test will run only on DUTs where all the conditions are satisfied. |
| 402 | |
| 403 | You can find the full list of supported conditions in the [hwdep package]. |
| 404 | |
Tatsuhisa Yamaguchi | 089ea76 | 2022-03-17 09:37:02 | [diff] [blame] | 405 | Note that there are special kinds of hardware dependencies, named `Model` and |
| 406 | `SkipOnModel`. |
Hidehiko Abe | 93f747d | 2020-03-30 06:54:02 | [diff] [blame] | 407 | With these dependencies, tests will be controlled based on the device type names, |
| 408 | rather than the device characteristics. |
| 409 | In general, it is recommended *not* to use these conditions. If you feel you need |
| 410 | these conditions, it is recommended to reconsider whether there is an alternative |
| 411 | (and more appropriate) condition. |
| 412 | Examples of their expected use cases are: |
| 413 | |
| 414 | * There are known issues in a driver of a specific device, which cannot be |
| 415 | fixed immediately. The test is stable on other models, and we would like |
| 416 | to promoted it to critical. |
| 417 | * There is a test running as informational. Flakiness failures are found |
| 418 | only on a few models, but the test is stable on other models. |
Tatsuhisa Yamaguchi | 089ea76 | 2022-03-17 09:37:02 | [diff] [blame] | 419 | With depending models, we can promote the test to critical on |
Hidehiko Abe | 93f747d | 2020-03-30 06:54:02 | [diff] [blame] | 420 | most of models, except ones where the test results flakiness. |
| 421 | In this case, it is expected that a dedicated engineer is assigned to |
| 422 | investigate the cause and its fix. |
| 423 | |
Seewai Fu | d948221 | 2023-04-25 01:50:57 | [diff] [blame] | 424 | [hwdep package]: https://chromium.googlesource.com/chromiumos/platform/tast/+/main/src/go.chromium.org/tast/core/testing/hwdep/ |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 425 | |
| 426 | ### Adding new hardware conditions |
| 427 | |
Jesse McGuire | 84c0970 | 2022-05-06 23:17:29 | [diff] [blame] | 428 | In order to guarantee forward compatibility in ChromeOS infra, |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 429 | each `Condition` should be based on the |
| 430 | `chromiumos.config.api.HardwareFeatures` protobuf schema. |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 431 | |
| 432 | For example, the `hwdep.Touchscreen()` can check |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 433 | whether `Screen.TouchSupport` is set to `HardwareFeatures_PRESENT`. |
Hidehiko Abe | 8a49614 | 2020-02-06 04:23:28 | [diff] [blame] | 434 | |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 435 | Note that currently a `chromiumos.config.api.HardwareFeatures` instance is |
| 436 | generated internally by Tast at runtime, so only limited fields are filled. |
Seewai Fu | 13e36d3 | 2022-11-19 03:17:34 | [diff] [blame] | 437 | In the future, ChromeOS Infra test scheduler will be responsible for checking |
| 438 | hardware dependencies before running Tast tests. |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 439 | |
| 440 | Here is an example end-to-end workflow: |
| 441 | Let’s assume that a developer wants to add a new Tast test which requires a new |
| 442 | hardware feature to be used in the test hardware constraints (e.g. “wifi chip |
| 443 | vendor name is X”). |
| 444 | |
Seewai Fu | 13e36d3 | 2022-11-19 03:17:34 | [diff] [blame] | 445 | 1. The developer makes a change for that hardware feature. |
| 446 | * The developer files a CL for a change to the schema |
| 447 | [(config/api/topology.proto)][1] to add a new field for the feature. |
| 448 | * A domain expert approves the change in the .proto file |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 449 | [(config/api/topology.proto)][1]. [(Example CL)][2] |
Jeremy Bettis | 21ac3f5 | 2023-01-26 18:15:49 | [diff] [blame] | 450 | 1. To test locally, run these commands to regenerate the go proto bindings. |
| 451 | ``` |
| 452 | ~/chromiumos/src/config/generate.sh |
| 453 | cros workon --host start cros-config-api |
| 454 | sudo emerge cros-config-api |
| 455 | ``` |
| 456 | 1. The developer waits until the CL in #1 is landed, then implements |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 457 | some functions in the Tast framework supporting the new feature(s) using the |
| 458 | new message type. |
| 459 | * The Tast team reviews and approves such a change to Tast. |
| 460 | [Here is an example CL][3] which puts some data into the protobuf in Tast. |
Jeremy Bettis | 21ac3f5 | 2023-01-26 18:15:49 | [diff] [blame] | 461 | 1. The developer writes test(s) with hwdeps in its test metadata using the |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 462 | above function in Tast. |
| 463 | |
Laurent Chavey | 1c1362f | 2021-02-17 02:56:43 | [diff] [blame] | 464 | [1]: https://source.chromium.org/chromium/infra/infra/+/HEAD:go/src/go.chromium.org/chromiumos/config/proto/chromiumos/config/api/topology.proto |
Tatsuhisa Yamaguchi | 1c905fa | 2020-09-15 06:23:41 | [diff] [blame] | 465 | [2]: https://chromium-review.googlesource.com/c/chromiumos/config/+/2249691/4/proto/chromiumos/config/api/topology.proto |
Hidehiko Abe | 25cadea | 2020-09-03 05:31:32 | [diff] [blame] | 466 | [3]: https://chromium-review.googlesource.com/c/chromiumos/platform/tast/+/2335615 |