Skip to content

Commit

Permalink
Report logs from routed test only on fail (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Jan 28, 2025
1 parent 226a1ba commit 29cdaa3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/routed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ for LOCATOR in $(echo "$LOCATORS" | xargs); do
sleep 5

echo "> Running $TESTBIN ..."
"$TESTBIN" "$LOCATOR"
"$TESTBIN" "$LOCATOR" > client."$1".log 2>&1
RETCODE=$?

echo "> Stopping zenohd ..."
kill -9 "$ZPID"

sleep 1

echo "> Logs of zenohd ..."
cat zenohd."$1".log

[ "$RETCODE" -lt 0 ] && exit "$RETCODE"
if [ "$RETCODE" -lt 0 ]; then
echo "> Logs of client ..."
cat client."$1".log
echo "> Logs of zenohd ..."
cat zenohd."$1".log
exit "$RETCODE"
fi
done

echo "> Done ($RETCODE)."
Expand Down

0 comments on commit 29cdaa3

Please sign in to comment.