From c684f06206c8997e3d990b6e5d59b62d01fb5566 Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Thu, 26 Oct 2023 11:35:31 -0500 Subject: [PATCH] Fix firmware.test --- .github/workflows/fsanitize-check.yml | 2 +- .github/workflows/ubuntu-check.yml | 2 +- scripts/client.test | 1 - scripts/firmware.test | 21 ++++++++++++++------- scripts/multithread.test | 1 - scripts/nbclient.test | 1 - 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/fsanitize-check.yml b/.github/workflows/fsanitize-check.yml index f5715c780..543e55420 100644 --- a/.github/workflows/fsanitize-check.yml +++ b/.github/workflows/fsanitize-check.yml @@ -88,4 +88,4 @@ jobs: - name: Show logs on failure if: failure() || cancelled() run: | - cat test-suite.log + more test-suite.log diff --git a/.github/workflows/ubuntu-check.yml b/.github/workflows/ubuntu-check.yml index 48be3713a..811233988 100644 --- a/.github/workflows/ubuntu-check.yml +++ b/.github/workflows/ubuntu-check.yml @@ -97,4 +97,4 @@ jobs: - name: Show logs on failure if: failure() || cancelled() run: | - cat test-suite.log + more test-suite.log diff --git a/scripts/client.test b/scripts/client.test index 06485a669..482427790 100755 --- a/scripts/client.test +++ b/scripts/client.test @@ -11,7 +11,6 @@ do_cleanup() { kill -9 $broker_pid echo "Killed broker PID $broker_pid" broker_pid=$no_pid - sleep 10 fi if [ $1 -ne 0 ] diff --git a/scripts/firmware.test b/scripts/firmware.test index 8aa4be229..6f2ce615f 100755 --- a/scripts/firmware.test +++ b/scripts/firmware.test @@ -6,15 +6,16 @@ no_pid=-1 broker_pid=$no_pid do_cleanup() { - # Delete file - rm $fileout + if [ $ENABLE_MQTT_TLS -ne 1 ]; then + # Delete file + rm $fileout + fi if [ $broker_pid != $no_pid ] then kill -9 $broker_pid echo "Killed broker PID $broker_pid" broker_pid=$no_pid - sleep 10 fi if [ $1 -ne 0 ] @@ -50,6 +51,9 @@ then def_args="${def_args} -h localhost -p 18883" fi +grep -F -e 'ENABLE_MQTT_TLS' ./wolfmqtt/options.h +ENABLE_MQTT_TLS=$? + # Start firmware push ./examples/firmware/fwpush $def_args -r -f $filein $1 server_result=$? @@ -60,10 +64,13 @@ server_result=$? client_result=$? [ $client_result -ne 0 ] && echo -e "\n\nMQTT Example fwclient failed!" && do_cleanup "-1" -# Compare files -md5sum -b $filein $fileout -compare_result=$? -[ $compare_result -ne 0 ] && echo -e "\n\nMQTT Example firmware compare failed!" && do_cleanup "-1" +if [ $ENABLE_MQTT_TLS -ne 1 ]; then + # Compare files + echo "Comparing files" + md5sum -b $filein $fileout + compare_result=$? + [ $compare_result -ne 0 ] && echo -e "\n\nMQTT Example firmware compare failed!" && do_cleanup "-1" +fi # End broker do_cleanup "0" diff --git a/scripts/multithread.test b/scripts/multithread.test index 03d2017b7..72f671df1 100755 --- a/scripts/multithread.test +++ b/scripts/multithread.test @@ -11,7 +11,6 @@ do_cleanup() { kill -9 $broker_pid echo "Killed broker PID $broker_pid" broker_pid=$no_pid - sleep 10 fi if [ $1 -ne 0 ] diff --git a/scripts/nbclient.test b/scripts/nbclient.test index 1dcf6a2cf..8d760d083 100755 --- a/scripts/nbclient.test +++ b/scripts/nbclient.test @@ -11,7 +11,6 @@ do_cleanup() { kill -9 $broker_pid echo "Killed broker PID $broker_pid" broker_pid=$no_pid - sleep 10 fi if [ $1 -ne 0 ]