1#!/usr/bin/env bash
2# Copyright 2024 Nordic Semiconductor ASA
3# SPDX-License-Identifier: Apache-2.0
4
5# This script runs the Babblesim CI UART tests.
6# It can also be run locally.
7# Note it will produce its output in ${ZEPHYR_BASE}/bsim_out/
8
9export ZEPHYR_BASE="${ZEPHYR_BASE:-${PWD}}"
10cd ${ZEPHYR_BASE}
11
12set -uex
13
14echo "UART: Single device tests"
15echo " nRF52833 & 5340:"
16${ZEPHYR_BASE}/scripts/twister -T tests/drivers/uart/ --force-color --inline-logs -v -M \
17  -p nrf52_bsim -p nrf5340bsim/nrf5340/cpuapp --fixture gpio_loopback \
18  -- -uart0_loopback -uart1_loopback
19
20echo " nRF54L15:"
21${ZEPHYR_BASE}/scripts/twister -T tests/drivers/uart/ --force-color --inline-logs -v -M \
22  -p nrf54l15bsim/nrf54l15/cpuapp --fixture gpio_loopback \
23  -- -uart2_loopback
24
25echo "UART: Multi device tests"
26WORK_DIR=${ZEPHYR_BASE}/bsim_uart nice tests/bsim/drivers/uart/compile.sh
27RESULTS_FILE=${ZEPHYR_BASE}/bsim_out/bsim_results.uart.52.xml \
28SEARCH_PATH=tests/bsim/drivers/uart/ tests/bsim/run_parallel.sh
29