Skip to content

Commit

Permalink
add precheck for binary path
Browse files Browse the repository at this point in the history
  • Loading branch information
sameh-farouk committed Dec 16, 2024
1 parent d538658 commit f21ef9f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tools/rmb_tester/test_live_nodes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ RMB_BIN="${RMB_BIN:-../../target/x86_64-unknown-linux-musl/release/rmb-peer}"
VERBOSE="${VERBOSE:-false}"
DEBUG="${DEBUG:-false}"

if [ -f "$RMB_BIN" ]; then
binary_version_output=$( "$RMB_BIN" --version )
else
echo "rmb-peer binary not found at $RMB_BIN"
exit 1
fi

cleanup() {
set +e
debug 'cleaning up initiated'
Expand Down Expand Up @@ -58,8 +65,10 @@ debug() {

trap cleanup SIGHUP SIGINT SIGQUIT SIGABRT SIGTERM

echo "starting live nodes rmb test script version $(git describe --tags)"
echo "network used: $1net"
echo 'starting live nodes rmb test script ...'
echo "network: $1net"
debug "script version: $(git describe --tags)"
debug "rmb-peer version: $binary_version_output"
# start redis in backgroud and skip errors in case alreday running
set +e
debug 'redis-server starting ...'
Expand Down

0 comments on commit f21ef9f

Please sign in to comment.