From aa85149699bd362a035b609ce6a3693976ed9aef Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Tue, 7 Jan 2025 15:27:52 -0800 Subject: [PATCH] Cleanup output --- bin/pull_mqtt | 5 ++--- bin/test_runlocal | 4 +--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/pull_mqtt b/bin/pull_mqtt index f9d4693a2..79f717914 100755 --- a/bin/pull_mqtt +++ b/bin/pull_mqtt @@ -1,4 +1,4 @@ -#!/bin/bash -ex +#!/bin/bash -e UDMI_ROOT=$(dirname $0)/.. cd $UDMI_ROOT @@ -56,9 +56,8 @@ sudo mosquitto_sub $SERVER_OPTS -R -F "%j" -t $topic_filter | out_path=$OUT_BASE/$registryId/devices/$deviceId/${timepath}/${usetime}_${subFolder}_${subType} out_dir=$(dirname $out_path) mkdir -p $out_dir - echo out_path is \"$out_path.json\" echo $(realpath --relative-to $OUT_BASE $out_path).json $topic - echo $json > ${out_path}.json + echo $json > $out_path.json echo {} | jq ".deviceRegistryId=\"$registryId\" | \ .subFolder=\"$subFolder\" | .subType=\"$subType\" | diff --git a/bin/test_runlocal b/bin/test_runlocal index b4399b43b..050a0a206 100755 --- a/bin/test_runlocal +++ b/bin/test_runlocal @@ -8,11 +8,9 @@ cd $UDMI_ROOT source etc/shell_common.sh -echo Captured $(wc -l out/message_capture.log) messages. cat out/message_capture.log -pwd -ls -l out/ +echo Captured $(wc -l out/message_capture.log) messages. deletes=$(find out/registries/ -name \*update_model.json | xargs jq .cloud.operation | fgrep DELETE | wc -l) [[ $deletes == 2 ]] || fail Expected 2 delete operations, found $deletes