mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
26 lines
966 B
Bash
Executable File
26 lines
966 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
export LWIP_DIR=`pwd`
|
|
export LWIP_CONTRIB_DIR=`pwd`/contrib
|
|
|
|
TEST_APPS="socket_no_linger socket_linger socket_linger_reuse tcp_socket_reuse"
|
|
STRESS_TEST_APPS="socket_linger"
|
|
|
|
cd test/apps
|
|
# Prepare a failing report in case we get stuck (check in no-fork mode)
|
|
python socket_linger_stress_test.py failed > ${LWIP_DIR}/socket_linger_stress_test.xml
|
|
for app in $TEST_APPS; do
|
|
cmake -DCI_BUILD=1 -DTEST_APP=${app} -B ${app} -G Ninja .
|
|
cmake --build ${app}/
|
|
timeout 10 ./${app}/lwip_test_apps
|
|
[ -f check2junit.py ] &&
|
|
python ${LWIP_DIR}/check2junit.py lwip_test_apps.xml > ${LWIP_DIR}/${app}.xml
|
|
done
|
|
# Run the lingering test multiple times
|
|
for stress_cfg in $STRESS_TEST_APPS; do
|
|
for run in {1..1000}; do ( timeout 10 ./$stress_cfg/lwip_test_apps ) || exit 1 ; done;
|
|
done
|
|
# All good, regenerate the stress test-report, since the test succeeded
|
|
python socket_linger_stress_test.py > ${LWIP_DIR}/socket_linger_stress_test.xml
|