Better error output when setup fails
This commit is contained in:
parent
4b65d8bac3
commit
a20b640f05
@ -19,7 +19,7 @@ oneTimeSetUp() {
|
||||
|
||||
# start basecoin server (with counter)
|
||||
initServer $BASE_DIR $CHAIN_ID 3456
|
||||
PID_SERVER=$!
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
|
||||
initClient $CHAIN_ID 34567
|
||||
|
||||
|
||||
@ -41,6 +41,12 @@ initServer() {
|
||||
echo "Starting ${SERVER_EXE} server..."
|
||||
${SERVER_EXE} start --home=$SERVE_DIR >>$SERVER_LOG 2>&1 &
|
||||
sleep 5
|
||||
PID_SERVER=$!
|
||||
if ! ps $PID_SERVER >/dev/null; then
|
||||
echo "**FAILED**"
|
||||
# cat $SERVER_LOG
|
||||
# return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# initClient requires chain_id arg, port is optional (default 46657)
|
||||
|
||||
@ -19,9 +19,10 @@ oneTimeSetUp() {
|
||||
|
||||
# start basecoin server (with counter)
|
||||
initServer $BASE_DIR $CHAIN_ID 1234
|
||||
PID_SERVER=$!
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
|
||||
initClient $CHAIN_ID 12347
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
|
||||
echo "...Testing may begin!"
|
||||
echo
|
||||
|
||||
@ -33,15 +33,19 @@ oneTimeSetUp() {
|
||||
|
||||
# start basecoin server, giving money to the key in the first client
|
||||
BC_HOME=${CLIENT_1} initServer $BASE_DIR_1 $CHAIN_ID_1 $PREFIX_1
|
||||
PID_SERVER_1=$!
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
PID_SERVER_1=$PID_SERVER
|
||||
|
||||
# start second basecoin server, giving money to the key in the second client
|
||||
BC_HOME=${CLIENT_2} initServer $BASE_DIR_2 $CHAIN_ID_2 $PREFIX_2
|
||||
PID_SERVER_2=$!
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
PID_SERVER_2=$PID_SERVER
|
||||
|
||||
# connect both clients
|
||||
BC_HOME=${CLIENT_1} initClient $CHAIN_ID_1 $PORT_1
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
BC_HOME=${CLIENT_2} initClient $CHAIN_ID_2 $PORT_2
|
||||
if [ $? != 0 ]; then return 1; fi
|
||||
|
||||
echo "...Testing may begin!"
|
||||
echo
|
||||
|
||||
Loading…
Reference in New Issue
Block a user