Skip to content

Commit

Permalink
Cleanup output
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Jan 7, 2025
1 parent 756bd03 commit aa85149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions bin/pull_mqtt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -ex
#!/bin/bash -e

UDMI_ROOT=$(dirname $0)/..
cd $UDMI_ROOT
Expand Down Expand Up @@ -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\" |
Expand Down
4 changes: 1 addition & 3 deletions bin/test_runlocal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit aa85149

Please sign in to comment.