tests: drivers: console: add console_switching test
This testsuite exercises a number of things. Namely
* `mutable` devices (i.e. those backed in SRAM)
* `uart_emul` support for interrupt mode (receive only)
* `devmux` capabilities of multiplexing several uarts
* switching the system console between several uart backends
Testing Done:
```
west build -p auto -b qemu_riscv64 -t run \
tests/drivers/console_switching/
...
*** Booting Zephyr OS build zephyr-v3.4.0-3988-gaaefb2d764ea ***
Running TESTSUITE console_switching
================================================================
START - test_read
read "Hello, uart_emul0!" from uart_emul0
read "Hello, uart_emul1!" from uart_emul1
read "Hello, uart_emul0!" from uart_emul0
read "Hello, uart_emul1!" from uart_emul1
PASS - test_read in 0.005 seconds
================================================================
START - test_write
wrote "Hello, uart_emul0!" to uart_emul0
wrote "Hello, uart_emul1!" to uart_emul1
wrote "Hello, uart_emul0!" to uart_emul0
wrote "Hello, uart_emul1!" to uart_emul1
PASS - test_write in 0.003 seconds
================================================================
TESTSUITE console_switching succeeded
------ TESTSUITE SUMMARY START ------
SUITE PASS - 100.00% [console_switching]: pass = 2, fail = 0,...
- PASS - [console_switching.test_read] duration = 0.005 seconds
- PASS - [console_switching.test_write] duration = 0.003 seconds
------ TESTSUITE SUMMARY END ------
===============================================================
PROJECT EXECUTION SUCCESSFUL
```
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-09-23 03:36:43 +08:00
|
|
|
CONFIG_ZTEST=y
|
|
|
|
CONFIG_SERIAL=y
|
|
|
|
CONFIG_CONSOLE=y
|
|
|
|
CONFIG_CONSOLE_SUBSYS=y
|
|
|
|
CONFIG_CONSOLE_GETLINE=y
|
|
|
|
CONFIG_DEVICE_MUTABLE=y
|
|
|
|
CONFIG_DEVMUX=y
|
2024-07-11 22:23:26 +08:00
|
|
|
CONFIG_EMUL=y
|