From 3c4add13601052b9289aad2ffa25ecf4d56a2a6d Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Tue, 31 Oct 2023 10:31:08 -0500 Subject: [PATCH] Fix tests --- .github/workflows/mqtt-sn-check.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mqtt-sn-check.yml b/.github/workflows/mqtt-sn-check.yml index 61b37a679..706d0c929 100644 --- a/.github/workflows/mqtt-sn-check.yml +++ b/.github/workflows/mqtt-sn-check.yml @@ -42,7 +42,8 @@ jobs: run: more gateway.conf - name: Run gateway working-directory: ./gateway/MQTTSNGateway/bin - run: sudo ./MQTT-SNGateway & + run: sudo ./MQTT-SNGateway &> ~/gateway.log & + gateway_pid=$! sleep 1 # let the broker set everything up # This is some debug info useful if something goes wrong @@ -84,6 +85,10 @@ jobs: RESULT=$? [ $RESULT -ne 0 ] && echo -e "\n\nMQTT-SN Client failed!" && exit 1 + # Cleanup + - name: Stop gateway + run: kill -2 $gateway_pid + # capture logs on failure - name: Show logs on failure if: failure() || cancelled()