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
|
fi
|
||||||
|
|
||||||
rm -rf build && mkdir build && \
|
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
|
||||||
|
|
||||||
ninja -C build run &
|
ninja -C build run &
|
||||||
|
@ -276,6 +276,34 @@ docker_exec ()
|
||||||
stop_docker
|
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)
|
coap_server)
|
||||||
start_configuration || return $?
|
start_configuration || return $?
|
||||||
start_zephyr
|
start_zephyr
|
||||||
|
|
2
west.yml
2
west.yml
|
@ -99,7 +99,7 @@ manifest:
|
||||||
revision: f28a637db12c4b12fb2b18bddc6b2a0deaa95251
|
revision: f28a637db12c4b12fb2b18bddc6b2a0deaa95251
|
||||||
path: modules/lib/mcumgr
|
path: modules/lib/mcumgr
|
||||||
- name: net-tools
|
- name: net-tools
|
||||||
revision: 1c4fdba512b268033a4cf926bddd323866c3261a
|
revision: e53774b71288a85f7321bfbfa57cae6d3419f022
|
||||||
path: tools/net-tools
|
path: tools/net-tools
|
||||||
- name: hal_nxp
|
- name: hal_nxp
|
||||||
revision: 12a6084be5710ec39d1cc7626582a3c470db1459
|
revision: 12a6084be5710ec39d1cc7626582a3c470db1459
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue