github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/set_test_env.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  export SET_TEST_ENV="YES"
     4  
     5  echo "include set_test_env.sh"
     6  
     7  BASEDIR="$( cd "$(dirname "$0")" ; pwd -P )"
     8  export PATH=$(pwd):$PATH
     9  
    10  export TEST_RAFT_HOME="$BASEDIR"
    11  export TEST_RAFT_CONF="$TEST_RAFT_HOME/config"
    12  export TEST_RAFT_INSTANCE="$TEST_RAFT_HOME/tmp"
    13  export TEST_RAFT_INSTANCE_DATA="$TEST_RAFT_HOME/tmp/data"
    14  export TEST_RAFT_INSTANCE_CONF="$TEST_RAFT_HOME/tmp/config"
    15  export TEST_RAFT_INSTANCE_CLIENT="$TEST_RAFT_HOME/tmp/client"
    16  
    17  if [ ! -d "$TEST_RAFT_INSTANCE_DATA" ];then
    18  	mkdir -p $TEST_RAFT_INSTANCE_DATA
    19  fi
    20  
    21  if [ ! -d "$TEST_RAFT_INSTANCE_CONF" ];then
    22  	mkdir -p $TEST_RAFT_INSTANCE_CONF
    23  fi
    24  
    25  if [ ! -d "$TEST_RAFT_INSTANCE_CLIENT" ];then
    26  	mkdir -p $TEST_RAFT_INSTANCE_CLIENT
    27  fi
    28