From 190705960dfa14f8bd6b1a42e5df12d99bb892ed Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Mon, 27 Apr 2020 17:20:26 +0300 Subject: [PATCH] scripts: net: Add SOCKS 5 to MQTT TLS sample test Start SOCKS5 proxy in the net-tools Docker image and run MQTT TLS tests with SOCKS enabled. Since the MQTT TLS server is already running as of the previous test, start only the danted daemon. Rely on mosquitto MQTT port being handled by the Docker image configuration file instead of specifying it on the command line. Signed-off-by: Patrik Flykt --- scripts/net/run-sample-tests.sh | 27 ++++++++++++++++++++++----- west.yml | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/scripts/net/run-sample-tests.sh b/scripts/net/run-sample-tests.sh index be5589630a9..c9c0448393c 100755 --- a/scripts/net/run-sample-tests.sh +++ b/scripts/net/run-sample-tests.sh @@ -317,7 +317,7 @@ docker_exec () mqtt_publisher) start_configuration || return $? - start_docker "/usr/local/sbin/mosquitto -v -p 1883 + start_docker "/usr/local/sbin/mosquitto -v -c /usr/local/etc/mosquitto/mosquitto.conf" || \ return $? @@ -326,16 +326,13 @@ docker_exec () wait_zephyr result=$? - stop_docker - if [ $result -ne 0 ] then break fi # test TLS - start_configuration || return $? - start_docker "/usr/local/sbin/mosquitto -v -p 8883 + start_docker "/usr/local/sbin/mosquitto -v -c /usr/local/etc/mosquitto/mosquitto-tls.conf" || \ return $? @@ -345,6 +342,26 @@ docker_exec () wait_zephyr result=$? + + if [ $result -ne 0 ] + then + break + fi + + # TLS and SOCKS5, mosquitto TLS is already running + start_docker "/usr/sbin/danted" || \ + return $? + + start_zephyr \ + -DOVERLAY_CONFIG="overlay-tls.conf overlay-sample.conf overlay-socks5.conf" \ + "$overlay" || return $? + + wait_zephyr + result=$? + + stop_docker + + return $result ;; *) diff --git a/west.yml b/west.yml index f6221313895..b00bc901d4c 100644 --- a/west.yml +++ b/west.yml @@ -89,7 +89,7 @@ manifest: revision: 1843fdce2b008b45f9cc8b38dd9a57a575ab50f6 path: modules/lib/mcumgr - name: net-tools - revision: 1080094bc246357c6c35e80e8b2d5d0ce7e0d963 + revision: 1c4fdba512b268033a4cf926bddd323866c3261a path: tools/net-tools - name: hal_nxp revision: 60fe8c0ae6e24d165cf42770b95c7df22b778386