You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

82 lines
1.5 KiB

#! /bin/bash
set -e
#- dummy over socket, curl
#- counter over socket, curl
#- counter over grpc, curl
#- counter over grpc, grpc
# TODO: install everything
export TMROOT=$HOME/.tendermint_app
function dummy_over_socket(){
rm -rf $TMROOT
tendermint init
echo "Starting dummy and tendermint"
dummy > /dev/null &
pid_dummy=$!
tendermint node > tendermint.log &
pid_tendermint=$!
sleep 5
echo "running test"
bash dummy_test.sh "Dummy over Socket"
kill -9 $pid_dummy $pid_tendermint
}
function counter_over_socket() {
rm -rf $TMROOT
tendermint init
echo "Starting counter and tendermint"
counter --serial > /dev/null &
pid_counter=$!
tendermint node > tendermint.log &
pid_tendermint=$!
sleep 5
echo "running test"
bash counter_test.sh "Counter over Socket"
kill -9 $pid_counter $pid_tendermint
}
function counter_over_grpc() {
rm -rf $TMROOT
tendermint init
echo "Starting counter and tendermint"
counter --serial --tmsp grpc > /dev/null &
pid_counter=$!
tendermint node --tmsp grpc > tendermint.log &
pid_tendermint=$!
sleep 5
echo "running test"
bash counter_test.sh "Counter over GRPC"
kill -9 $pid_counter $pid_tendermint
}
cd $GOPATH/src/github.com/tendermint/tendermint/test/app
case "$1" in
"dummy_over_socket")
dummy_over_socket
;;
"counter_over_socket")
counter_over_socket
;;
"counter_over_grpc")
counter_over_grpc
;;
*)
echo "Running all"
dummy_over_socket
echo ""
counter_over_socket
echo ""
counter_over_grpc
esac