diff --git a/tests/cli/basictx.sh b/tests/cli/basictx.sh index 0f2eb7803a..55e518819d 100755 --- a/tests/cli/basictx.sh +++ b/tests/cli/basictx.sh @@ -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 diff --git a/tests/cli/common.sh b/tests/cli/common.sh index d39355fe05..5338a29ce6 100644 --- a/tests/cli/common.sh +++ b/tests/cli/common.sh @@ -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) diff --git a/tests/cli/counter.sh b/tests/cli/counter.sh index 599f511297..f09a260b76 100755 --- a/tests/cli/counter.sh +++ b/tests/cli/counter.sh @@ -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 diff --git a/tests/cli/ibc.sh b/tests/cli/ibc.sh index f7c870333a..5d8758fc36 100755 --- a/tests/cli/ibc.sh +++ b/tests/cli/ibc.sh @@ -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