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 | |
| 3 | A test may specify software features that must be supported by the DUT's system |
| 4 | image in order for the test to run successfully. If one or more features aren't |
| 5 | supported by the DUT, the test will (usually) be skipped. See the `tast` |
| 6 | command's `-checktestdeps` flag to control this behavior. |
| 7 | |
| 8 | Tests specify dependencies through the `SoftwareDeps` field in [testing.Test]. |
| 9 | The following software features are defined: |
| 10 | |
Becca Hughes | 8247fde | 2018-11-09 18:50:03 | [diff] [blame] | 11 | * `android` - The ability to [run Android apps]. Any version of Android can be |
Eric Caruso | 6ca58ce | 2018-12-04 00:38:38 | [diff] [blame] | 12 | used. |
Becca Hughes | 8247fde | 2018-11-09 18:50:03 | [diff] [blame] | 13 | * `android_p` - The ability to [run Android apps] that require Android P or |
Eric Caruso | 6ca58ce | 2018-12-04 00:38:38 | [diff] [blame] | 14 | 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 Erat | 943de1b | 2018-07-03 17:32:16 | [diff] [blame] | 18 | * `audio_play` - The ability to play audio. |
| 19 | * `audio_record` - The ability to record audio. |
Daniel Erat | df04ea0 | 2018-09-19 21:31:24 | [diff] [blame] | 20 | * `autotest-capability:foo` - An [Autotest capability] named `foo`. See below. |
Keiichi Watanabe | c7acad0 | 2018-10-16 10:19:49 | [diff] [blame] | 21 | * `camera_720p` - The ability to capture video with frame size 1280x720. |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 22 | * `chrome` - A Chrome process. |
Keiichi Watanabe | 7e0a96a | 2018-11-06 11:28:24 | [diff] [blame] | 23 | * `chrome_internal` - Features that are only available in official Chrome, |
| 24 | rather than Chromium. (e.g. proprietary codec like H.264) |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 25 | * `chrome_login` - Implies `chrome` with the further requirement that user |
| 26 | login (i.e. using `session_manager` and `cryptohome`) is supported. |
Daniel Erat | 6ada41d | 2018-12-18 22:37:10 | [diff] [blame] | 27 | * `containers` - The ability to run code within containers. This implies the |
| 28 | presence of the `run_oci` program. |
Hidehiko Abe | c9c3413 | 2018-09-26 15:10:53 | [diff] [blame] | 29 | * `cups` - CUPS daemon. |
Shuhei Takahashi | dd13172 | 2018-08-01 06:53:21 | [diff] [blame] | 30 | * `display_backlight` - An internal display backlight. |
Daniel Erat | 92d132d | 2018-12-13 05:31:54 | [diff] [blame] | 31 | * `gpu_sandboxing` - Chrome's GPU process is [sandboxed]. |
Luigi Semenzato | edde071 | 2018-11-14 18:26:46 | [diff] [blame] | 32 | * `memd` - [Memory stats collection daemon]. |
Andrew Moylan | e739f2e | 2018-09-20 22:34:53 | [diff] [blame] | 33 | * `ml_service` - ML Service daemon. |
Daniel Erat | 63de30d | 2018-11-20 00:48:34 | [diff] [blame] | 34 | * `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 Erat | 9747888 | 2018-11-14 05:54:39 | [diff] [blame] | 36 | * `no_symlink_mount` - Symlink mounting is disabled via the |
| 37 | `CONFIG_SECURITY_CHROMIUMOS_NO_SYMLINK_MOUNT` kernel option. |
Daniel Erat | e758f64 | 2018-11-29 19:59:31 | [diff] [blame] | 38 | * `reboot` - The ability to reboot reliably during a remote test. |
Daniel Erat | 86c6437 | 2018-09-25 19:28:26 | [diff] [blame] | 39 | * `screenshot` - The [screenshot command] can save screenshots. |
Qijiang Fan | 7ced1b9 | 2018-09-07 04:08:16 | [diff] [blame] | 40 | * `selinux` - An SELinux-enabled board. All Android boards are |
| 41 | SELinux-enabled. |
Qijiang Fan | 066d266 | 2019-01-10 09:25:12 | [diff] [blame] | 42 | * `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 Cook | 74596d3 | 2019-01-25 02:20:58 | [diff] [blame] | 47 | * `stable_egl` - Board has stable EGL graphics driver (e.g. not a nyan board). |
| 48 | https://crbug.com/717275 |
Tetsui Ohkubo | 1960f3a | 2018-12-20 04:39:02 | [diff] [blame] | 49 | * `tablet_mode` - The ability to enter tablet mode. The device is either |
| 50 | a convertible device or a tablet device. |
Daniel Erat | 943de1b | 2018-07-03 17:32:16 | [diff] [blame] | 51 | * `tpm` - A [Trusted Platform Module] chip. |
George Burgess IV | 28e8fc5 | 2019-01-16 19:46:50 | [diff] [blame] | 52 | * `transparent_hugepage` - [Transparent Hugepage] support in the Linux kernel. |
Stephen Barber | e148256 | 2018-05-21 23:54:52 | [diff] [blame] | 53 | * `vm_host` - The ability to [run virtual machines]. |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 54 | |
| 55 | Software features are composed from USE flags. [local_test_runner] lists boolean |
| 56 | expressions that are used to generate features; for example, an imaginary |
| 57 | feature named `hd_audio` with expression `cras && (audio_chipset_a || |
| 58 | audio_chipset_b) && !broken_headphone_jack` will be reported as available on |
| 59 | systems 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. |
| 61 | Before a new USE flag can be used in an expression, it must be added to `IUSE` |
| 62 | in the [tast-use-flags] package. |
| 63 | |
Daniel Erat | a341383 | 2019-01-31 23:43:32 | [diff] [blame] | 64 | ## Example changes |
| 65 | |
Daniel Erat | 920fc65 | 2018-12-19 16:11:22 | [diff] [blame] | 66 | See the following changes for an example of adding a new `containers` software |
| 67 | feature 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 Erat | a341383 | 2019-01-31 23:43:32 | [diff] [blame] | 73 | ## autotest-capability |
| 74 | |
| 75 | Exceptions to the above are `autotest-capability:`-prefixed features, which are |
| 76 | added by the [autocaps package] as specified by YAML files in |
Daniel Erat | df04ea0 | 2018-09-19 21:31:24 | [diff] [blame] | 77 | `/usr/local/etc/autotest-capability`. This exists in order to support porting |
| 78 | existing Autotest-based video tests to Tast. Do not depend on capabilities from |
| 79 | outside of video tests. |
| 80 | |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 81 | [testing.Test]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/chromiumos/tast/testing#Test |
Daniel Erat | d8c4c4c | 2018-05-08 00:35:12 | [diff] [blame] | 82 | [run Android apps]: https://developer.android.com/topic/arc/ |
Eric Caruso | 6ca58ce | 2018-12-04 00:38:38 | [diff] [blame] | 83 | [AddressSanitizer]: https://github.com/google/sanitizers/wiki/AddressSanitizer |
Daniel Erat | df04ea0 | 2018-09-19 21:31:24 | [diff] [blame] | 84 | [Autotest capability]: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/autotest-capability-default/ |
Daniel Erat | 92d132d | 2018-12-13 05:31:54 | [diff] [blame] | 85 | [sandboxed]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux_sandboxing.md |
Luigi Semenzato | edde071 | 2018-11-14 18:26:46 | [diff] [blame] | 86 | [Memory stats collection daemon]: https://chromium.googlesource.com/chromiumos/platform2/+/master/metrics/memd/ |
Daniel Erat | 86c6437 | 2018-09-25 19:28:26 | [diff] [blame] | 87 | [screenshot command]: https://chromium.googlesource.com/chromiumos/platform2/+/master/screenshot/ |
Daniel Erat | 943de1b | 2018-07-03 17:32:16 | [diff] [blame] | 88 | [Trusted Platform Module]: https://en.wikipedia.org/wiki/Trusted_Platform_Module |
Luigi Semenzato | edde071 | 2018-11-14 18:26:46 | [diff] [blame] | 89 | [run virtual machines]: https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md |
Daniel Erat | 5b270ed | 2018-05-02 05:37:54 | [diff] [blame] | 90 | [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 Erat | df04ea0 | 2018-09-19 21:31:24 | [diff] [blame] | 92 | [autocaps package]: https://godoc.org/chromium.googlesource.com/chromiumos/platform/tast.git/src/chromiumos/tast/autocaps/ |
George Burgess IV | 28e8fc5 | 2019-01-16 19:46:50 | [diff] [blame] | 93 | [Transparent Hugepage]: https://www.kernel.org/doc/Documentation/vm/transhuge.txt |