From 9de27fb24f9a8c92b307b4c55e96abb860b3d26c Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Fri, 13 May 2022 17:53:31 +0800 Subject: [PATCH] test script cleanup --- scripts/integration-test-all.sh | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/integration-test-all.sh b/scripts/integration-test-all.sh index b8074073..3c729f88 100755 --- a/scripts/integration-test-all.sh +++ b/scripts/integration-test-all.sh @@ -17,10 +17,10 @@ RPC_PORT="854" IP_ADDR="0.0.0.0" KEY="mykey" -CHAINID="ethermint_9000-1" +CHAINID="chibaclonk_9000-1" MONIKER="mymoniker" -## default port prefixes for ethermintd +## default port prefixes for chibaclonkd NODE_P2P_PORT="2660" NODE_PORT="2663" NODE_RPC_PORT="2666" @@ -55,6 +55,7 @@ set -euxo pipefail DATA_DIR=$(mktemp -d -t ethermint-datadir.XXXXX) +DATA_DIR=$(mktemp -d -t chibaclonk-datadir.XXXXX) if [[ ! "$DATA_DIR" ]]; then echo "Could not create $DATA_DIR" exit 1 @@ -105,17 +106,21 @@ init_func() { start_func() { echo "starting chibaclonk node $i in background ..." - "$PWD"/build/chibaclonkd start --pruning=nothing --rpc.unsafe \ - --p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" --address tcp://$IP_ADDR:$NODE_PORT"$i" --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \ - --json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \ - --json-rpc.api="eth,txpool,personal,net,debug,web3" \ - --keyring-backend test --mode validator --home "$DATA_DIR$i" \ + "$PWD"/build/chibaclonkd start \ + --pruning=nothing --rpc.unsafe \ + --p2p.laddr tcp://$IP_ADDR:$NODE_P2P_PORT"$i" \ + --address tcp://$IP_ADDR:$NODE_PORT"$i" \ + --rpc.laddr tcp://$IP_ADDR:$NODE_RPC_PORT"$i" \ + --json-rpc.address=$IP_ADDR:$RPC_PORT"$i" \ + --json-rpc.api="eth,txpool,personal,net,debug,web3" \ + --keyring-backend test --mode validator --home "$DATA_DIR$i" \ + --log_level debug \ >"$DATA_DIR"/node"$i".log 2>&1 & disown - ETHERMINT_PID=$! - echo "started chibaclonk node, pid=$ETHERMINT_PID" + CHIBACLONK_PID=$! + echo "started chibaclonk node, pid=$CHIBACLONK_PID" # add PID to array - arr+=("$ETHERMINT_PID") + arr+=("$CHIBACLONK_PID") if [[ $MODE == "pending" ]]; then echo "waiting for the first block..." @@ -164,16 +169,15 @@ if [[ -z $TEST || $TEST == "rpc" || $TEST == "pending" ]]; then TEST_FAIL=$? done - fi stop_func() { - ETHERMINT_PID=$i - echo "shutting down node, pid=$ETHERMINT_PID ..." + CHIBACLONK_PID=$i + echo "shutting down node, pid=$CHIBACLONK_PID ..." - # Shutdown ethermint node - kill -9 "$ETHERMINT_PID" - wait "$ETHERMINT_PID" + # Shutdown chibaclonk node + kill -9 "$CHIBACLONK_PID" + wait "$CHIBACLONK_PID" if [ $REMOVE_DATA_DIR == "true" ] then