blob: 2049086a53e4c721cee41bcb9808010bb06b7478 [file] [log] [blame] [view]
Daniel Erat599e0242018-09-15 00:52:551# Tast Test Dependencies (go/tast-deps)
Daniel Erat5b270ed2018-05-02 05:37:542
3A test may specify software features that must be supported by the DUT's system
4image in order for the test to run successfully. If one or more features aren't
5supported by the DUT, the test will (usually) be skipped. See the `tast`
6command's `-checktestdeps` flag to control this behavior.
7
8Tests specify dependencies through the `SoftwareDeps` field in [testing.Test].
9The following software features are defined:
10
Becca Hughes8247fde2018-11-09 18:50:0311* `android` - The ability to [run Android apps]. Any version of Android can be
Eric Caruso6ca58ce2018-12-04 00:38:3812 used.
Becca Hughes8247fde2018-11-09 18:50:0313* `android_p` - The ability to [run Android apps] that require Android P or
Eric Caruso6ca58ce2018-12-04 00:38:3814 later.
15* `aslr` - Address space layout randomization, which mitigates buffer-overflow
16 attacks, is functional (this is not true for builds with [AddressSanitizer]
17 instrumentation built in).
Daniel Erat943de1b2018-07-03 17:32:1618* `audio_play` - The ability to play audio.
19* `audio_record` - The ability to record audio.
Daniel Eratdf04ea02018-09-19 21:31:2420* `autotest-capability:foo` - An [Autotest capability] named `foo`. See below.
Keiichi Watanabec7acad02018-10-16 10:19:4921* `camera_720p` - The ability to capture video with frame size 1280x720.
Daniel Erat5b270ed2018-05-02 05:37:5422* `chrome` - A Chrome process.
Keiichi Watanabe7e0a96a2018-11-06 11:28:2423* `chrome_internal` - Features that are only available in official Chrome,
24 rather than Chromium. (e.g. proprietary codec like H.264)
Daniel Erat5b270ed2018-05-02 05:37:5425* `chrome_login` - Implies `chrome` with the further requirement that user
26 login (i.e. using `session_manager` and `cryptohome`) is supported.
Daniel Erat6ada41d2018-12-18 22:37:1027* `containers` - The ability to run code within containers. This implies the
28 presence of the `run_oci` program.
Hidehiko Abec9c34132018-09-26 15:10:5329* `cups` - CUPS daemon.
Shuhei Takahashidd131722018-08-01 06:53:2130* `display_backlight` - An internal display backlight.
Daniel Erat92d132d2018-12-13 05:31:5431* `gpu_sandboxing` - Chrome's GPU process is [sandboxed].
Luigi Semenzatoedde0712018-11-14 18:26:4632* `memd` - [Memory stats collection daemon].
Andrew Moylane739f2e2018-09-20 22:34:5333* `ml_service` - ML Service daemon.
Daniel Erat63de30d2018-11-20 00:48:3434* `no_android` - The inability to run Android apps. This is the opposite of
35 the `android` feature; DUTs will have exactly one of these two features.
Daniel Erat97478882018-11-14 05:54:3936* `no_symlink_mount` - Symlink mounting is disabled via the
37 `CONFIG_SECURITY_CHROMIUMOS_NO_SYMLINK_MOUNT` kernel option.
Daniel Erate758f642018-11-29 19:59:3138* `reboot` - The ability to reboot reliably during a remote test.
Daniel Erat86c64372018-09-25 19:28:2639* `screenshot` - The [screenshot command] can save screenshots.
Qijiang Fan7ced1b92018-09-07 04:08:1640* `selinux` - An SELinux-enabled board. All Android boards are
41 SELinux-enabled.
Qijiang Fan066d2662019-01-10 09:25:1242* `selinux_current` - All SELinux-enabled boards except experimental boards.
43 This implies `selinux`.
44* `selinux_experimental` - An experimental SELinux board. An experimental
45 board has `SELINUX=permissive` in `/etc/selinux/config`, thus no policy
46 will be enforced. This implies `selinux`.
James Cook74596d32019-01-25 02:20:5847* `stable_egl` - Board has stable EGL graphics driver (e.g. not a nyan board).
48 https://crbug.com/717275
Tetsui Ohkubo1960f3a2018-12-20 04:39:0249* `tablet_mode` - The ability to enter tablet mode. The device is either
50 a convertible device or a tablet device.
Daniel Erat943de1b2018-07-03 17:32:1651* `tpm` - A [Trusted Platform Module] chip.
George Burgess IV28e8fc52019-01-16 19:46:5052* `transparent_hugepage` - [Transparent Hugepage] support in the Linux kernel.
Stephen Barbere1482562018-05-21 23:54:5253* `vm_host` - The ability to [run virtual machines].
Daniel Erat5b270ed2018-05-02 05:37:5454
55Software features are composed from USE flags. [local_test_runner] lists boolean
56expressions that are used to generate features; for example, an imaginary
57feature named `hd_audio` with expression `cras && (audio_chipset_a ||
58audio_chipset_b) && !broken_headphone_jack` will be reported as available on
59systems where the `cras` USE flag is set, either `audio_chipset_a` or
60`audio_chipset_b` is set, and `broken_headphone_jack` is explicitly *not* set.
61Before a new USE flag can be used in an expression, it must be added to `IUSE`
62in the [tast-use-flags] package.
63
Daniel Erata3413832019-01-31 23:43:3264## Example changes
65
Daniel Erat920fc652018-12-19 16:11:2266See the following changes for an example of adding a new `containers` software
67feature based on the `containers` USE flag and making a test depend on it:
68
69* `chromiumos-overlay` repository: <https://crrev.com/c/1382877>
70* `tast` repository: <https://crrev.com/c/1382621>
71* `tast-tests` repository: <https://crrev.com/c/1382878>
72
Daniel Erata3413832019-01-31 23:43:3273## autotest-capability
74
75Exceptions to the above are `autotest-capability:`-prefixed features, which are
76added by the [autocaps package] as specified by YAML files in
Daniel Eratdf04ea02018-09-19 21:31:2477`/usr/local/etc/autotest-capability`. This exists in order to support porting
78existing Autotest-based video tests to Tast. Do not depend on capabilities from
79outside of video tests.
80
Daniel Erat5b270ed2018-05-02 05:37:5481[testing.Test]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/chromiumos/tast/testing#Test
Daniel Eratd8c4c4c2018-05-08 00:35:1282[run Android apps]: https://developer.android.com/topic/arc/
Eric Caruso6ca58ce2018-12-04 00:38:3883[AddressSanitizer]: https://github.com/google/sanitizers/wiki/AddressSanitizer
Daniel Eratdf04ea02018-09-19 21:31:2484[Autotest capability]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/autotest-capability-default/
Daniel Erat92d132d2018-12-13 05:31:5485[sandboxed]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_sandboxing.md
Luigi Semenzatoedde0712018-11-14 18:26:4686[Memory stats collection daemon]: https://chromium.googlesource.com/chromiumos/platform2/+/master/metrics/memd/
Daniel Erat86c64372018-09-25 19:28:2687[screenshot command]: https://chromium.googlesource.com/chromiumos/platform2/+/master/screenshot/
Daniel Erat943de1b2018-07-03 17:32:1688[Trusted Platform Module]: https://en.wikipedia.org/wiki/Trusted_Platform_Module
Luigi Semenzatoedde0712018-11-14 18:26:4689[run virtual machines]: https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md
Daniel Erat5b270ed2018-05-02 05:37:5490[local_test_runner]: https://chromium.googlesource.com/chromiumos/platform/tast/+/master/src/chromiumos/cmd/local_test_runner/main.go
91[tast-use-flags]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/tast-use-flags/
Daniel Eratdf04ea02018-09-19 21:31:2492[autocaps package]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/chromiumos/tast/autocaps/
George Burgess IV28e8fc52019-01-16 19:46:5093[Transparent Hugepage]: https://www.kernel.org/doc/Documentation/vm/transhuge.txt