zephyr/tests/drivers/console_switching/CMakeLists.txt
Christopher Friedt b13ec704d0 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-11-28 15:35:39 +01:00

10 lines
213 B
CMake

# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(uart_console_switching)
target_sources(app PRIVATE
src/main.c
)