Skip to content

Commit e24df21

Browse files
committed
WIP: mod: scripts/tests/z-wave-stack-binaries-test.sh (main)
Signed-off-by: Philippe Coval <[email protected]>
1 parent f710065 commit e24df21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

scripts/tests/z-wave-stack-binaries-test.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ red="\e[0;31m"
4040
yellow='\e[1;33m'
4141

4242
# Prevent github issue: "TERM environment variable not set."
43-
[ "" != "$TERM" ] || export TERM=dumb
43+
[ "" != "$TERM" ] || export TERM="dumb"
4444

4545
usage_()
4646
{
@@ -130,17 +130,16 @@ mqtt_()
130130
{
131131
log_ "mqtt: Wait for broker then flush queue before use and log traffic"
132132
while true ; do
133-
pidof mosquitto \
134-
&& mosquitto_sub \
135-
-v -t '#' --remove-retained --retained-only -W 1 \
136-
&& break
137-
sleep .1
138-
done > /dev/null 2>&1
133+
# mosquitto_sub -v -t '#' --remove-retained --retained-only -W 1 ||:
134+
mosquitto_sub -v -t '#' ||:
135+
sleep 1
136+
done
139137
mosquitto_sub -v -t '#' -W $((60 * ${duration}))
140138
log_ "mqtt: error: Should have finish before ${duration} may need to update it"
141139
die_
142140
}
143141

142+
144143
sub_()
145144
{
146145
local sub="#"
@@ -209,6 +208,7 @@ pubsub_()
209208
sub_ "$sub" "$expect" "$count"
210209
fi
211210
sleep 1
211+
[ "0" = "$code" ] || exit_ $code # Quit on 1st failure
212212
}
213213

214214

0 commit comments

Comments
 (0)