# Hardware-in-loop Testing for `esp-hal`
## Overview
This document describes the self-hosted runners and test infrastructure required for hardware-in-loop testing of `esp-hal`.
### Infrastructure
- We have a number of self-hosted runners with devkits physically attached.
- These runners are configured at the organization level (ie. `esp-rs`).
- See [Brno-office-machines-inventory]
- See [Self Hosted Runners HackMD note](https://hackmd.io/39Q0BHoQT2CuD_j6ny5XQg?both)
- Currently only RISC-V devices are supported (this is a limitation of `probe-rs`, `semihosting` and `embedded-test`)
- ESP32-S3 is also supprted, but not yet upstreamed, see https://github.com/probe-rs/probe-rs/pull/2303 and https://github.com/taiki-e/semihosting/pull/9
[Brno-office-machines-inventory]: https://espressifsystems.sharepoint.com/sites/Platform/Lists/Brno%20Office%20machines%20inventory/AllItems.aspx?env=WebViewList&useFiltersInViewXml=1&isAscending=true&sortField=LinkTitle&viewid=709958ca%2D450a%2D4177%2D8af5%2Df7ff565e2b99&FilterField1=Runner&FilterValue1=GitHub%20runner%20RUST&FilterType1=MultiChoice&FilterOp1=Eq
[teleprobe]: https://github.com/embassy-rs/teleprobe
### Peripherals to tests
List taken from the `esp-hal` modules, many items does not make sense/there is no way to test them.
- [ ] aes - Easy
- [x] DMA
- [ ] Non- DMA
- [ ] analog - Hard
- [ ] assist_debug - Hard
- [ ] clock - Should we test this?
- [ ] delay - Easy
- [ ] dma - Should we test this?
- [ ] ecc - Easy
- [ ] gpio - Easy
- [ ] hmac - Easy
- [ ] i2c - Hard
- [ ] i2s - Hard
- [ ] interrupt - Should we test this?
- [ ] lcd_cam - Shoudl we test this?
- JB: Not sure this is feasible?
- [ ] ledc -
- [ ] mcpwm - Hard
- [ ] otg_fs - Hard
- [ ] parl_io - Hard
- [ ] pcnt - Hard
- [ ] rmt - Hard?
- [ ] rng - Hard
- [ ] rom - Should we test this?
- JB: This is probably adequately covered by the drivers using these functions
- [ ] rsa - Easy
- [ ] rtc_cntl - Should we test this?
- [ ] sha - Easy
- [ ] soc - Should we test this?
- JB: This should all be internal (except the peripherals) so we cannot test it directly
- [ ] spi
- [x] Half duplex - Hard
- [ ] Full duplex - Easy
- DMA
- [ ] Half duplex
- [ ] Full duplex
- [ ] systimer - Hard
- [ ] timer - Hard
- [ ] trace - Hard
- [ ] twai - Hard
- [ ] uart - Easy
- [ ] usb_serial_jtag - Easy?