1#!/usr/bin/env bash 2# Copyright 2018 Oticon A/S 3# Copyright 2023 Nordic Semiconductor ASA 4# SPDX-License-Identifier: Apache-2.0 5 6# Simple selfchecking test for openthread, based on the echo client / server sample apps 7# It relies on the bs_tests hooks to register a test timer callback, which after a deadline 8# will check how many packets the echo client has got back as expected, and if over a threshold 9# it considers the test passed 10 11simulation_id="echo_test_ot" 12verbosity_level=2 13 14source ${ZEPHYR_BASE}/tests/bsim/sh_common.source 15 16EXECUTE_TIMEOUT=100 17 18cd ${BSIM_OUT_PATH}/bin 19 20Execute ./bs_${BOARD_TS}_tests_bsim_net_sockets_echo_test_prj_conf_overlay-ot_conf \ 21 -v=${verbosity_level} -s=${simulation_id} -start_offset=2e6 -d=0 -RealEncryption=1 \ 22 -testid=echo_client 23 24Execute ./bs_${BOARD_TS}_samples_net_sockets_echo_server_prj_conf_overlay-ot_conf\ 25 -v=${verbosity_level} -s=${simulation_id} -d=1 -RealEncryption=1 \ 26 27Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \ 28 -D=2 -sim_length=40e6 -argschannel -at=40 -argsmain $@ 29 30wait_for_background_jobs #Wait for all programs in background and return != 0 if any fails 31