multimode virtual test working better

This commit is contained in:
drowe67 2021-12-15 16:43:47 +10:30 committed by David Rowe
parent 53a88bfaae
commit cbd89324f3
2 changed files with 10 additions and 7 deletions

View file

@ -80,6 +80,6 @@ add_test(NAME 001_highsnr_virtual3_P_P_MM
PATH=$PATH:${CODEC2_BUILD_DIR}/src; PATH=$PATH:${CODEC2_BUILD_DIR}/src;
cd ${CMAKE_CURRENT_SOURCE_DIR}/test/001_highsnr_stdio_audio; cd ${CMAKE_CURRENT_SOURCE_DIR}/test/001_highsnr_stdio_audio;
./test_virtual_mm.sh") ./test_virtual_mm.sh")
set_tests_properties(001_highsnr_virtual3_P_P_MM PROPERTIES PASS_REGULAR_EXPRESSION "RECEIVED BURSTS: 5 RECEIVED FRAMES: 10 RX_ERRORS: 0") set_tests_properties(001_highsnr_virtual3_P_P_MM PROPERTIES PASS_REGULAR_EXPRESSION "DATAC0: 2/4 DATAC1: 2/4 DATAC3: 2/4")
endif() endif()

View file

@ -11,19 +11,22 @@ function check_alsa_loopback {
fi fi
} }
myInterruptHandler()
{
exit 1
}
check_alsa_loopback check_alsa_loopback
RX_LOG=$(mktemp) RX_LOG=$(mktemp)
trap myInterruptHandler SIGINT
# make sure all child processes are killed when we exit # make sure all child processes are killed when we exit
trap 'jobs -p | xargs -r kill' EXIT trap 'jobs -p | xargs -r kill' EXIT
python3 test_multimode_rx.py --timeout 30 --framesperburst 2 --bursts 1 --audiodev -2 --debug & python3 test_multimode_rx.py --timeout 60 --framesperburst 2 --bursts 2 --audiodev -2 &
rx_pid=$! rx_pid=$!
sleep 1 sleep 1
python3 test_multimode_tx.py --framesperburst 2 --bursts 1 --audiodev -2 python3 test_multimode_tx.py --framesperburst 2 --bursts 2 --audiodev -2 --delay 500
#tail -f ${RX_LOG} | sed '/RECEIVED BURSTS/ q'
wait ${rx_pid} wait ${rx_pid}