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:
Jukka Rissanen 2020-11-09 15:57:26 +02:00 committed by Anas Nashif
commit d29ae958e9
2 changed files with 30 additions and 2 deletions

View file

@ -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

View file

@ -99,7 +99,7 @@ manifest:
revision: f28a637db12c4b12fb2b18bddc6b2a0deaa95251
path: modules/lib/mcumgr
- name: net-tools
revision: 1c4fdba512b268033a4cf926bddd323866c3261a
revision: e53774b71288a85f7321bfbfa57cae6d3419f022
path: tools/net-tools
- name: hal_nxp
revision: 12a6084be5710ec39d1cc7626582a3c470db1459