net: scripts: Add http-client sample to Docker testing
Add a way to run http-client against http(s)-server.py that is running in Docker. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
8ab3dc256c
commit
d29ae958e9
2 changed files with 30 additions and 2 deletions
|
@ -143,7 +143,7 @@ start_zephyr ()
|
|||
fi
|
||||
|
||||
rm -rf build && mkdir build && \
|
||||
cmake -GNinja -DBOARD=native_posix -B build "$@" && \
|
||||
cmake -GNinja -DBOARD=native_posix -B build "$@" . && \
|
||||
ninja -C build
|
||||
|
||||
ninja -C build run &
|
||||
|
@ -276,6 +276,34 @@ docker_exec ()
|
|||
stop_docker
|
||||
;;
|
||||
|
||||
http_client)
|
||||
# First the non-tls version
|
||||
start_configuration "--ip=192.0.2.2 --ip6=2001:db8::2" || return $?
|
||||
start_docker "/usr/local/bin/http-server.py" || return $?
|
||||
start_zephyr "$overlay" "-DCONFIG_NET_SAMPLE_SEND_ITERATIONS=5"
|
||||
wait_zephyr
|
||||
result=$?
|
||||
stop_docker
|
||||
|
||||
if [ $result -ne 0 ]; then
|
||||
break;
|
||||
fi
|
||||
|
||||
# If everything is ok so far, do the TLS version
|
||||
if [ -n "$zephyr_overlay" ]; then
|
||||
overlay="${zephyr_overlay};overlay-tls.conf"
|
||||
else
|
||||
overlay="-DOVERLAY_CONFIG=overlay-tls.conf"
|
||||
fi
|
||||
|
||||
start_configuration "--ip=192.0.2.2 --ip6=2001:db8::2" || return $?
|
||||
start_docker "/usr/local/bin/https-server.py" || return $?
|
||||
start_zephyr "$overlay" "-DCONFIG_NET_SAMPLE_SEND_ITERATIONS=5"
|
||||
wait_zephyr
|
||||
result=$?
|
||||
stop_docker
|
||||
;;
|
||||
|
||||
coap_server)
|
||||
start_configuration || return $?
|
||||
start_zephyr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue