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.

58 lines
1.2 KiB

  1. #! /bin/bash
  2. set -ex
  3. #- kvstore over socket, curl
  4. # TODO: install everything
  5. export PATH="$GOBIN:$PATH"
  6. export TMHOME=$HOME/.tendermint_app
  7. function kvstore_over_socket(){
  8. rm -rf $TMHOME
  9. tendermint init validator
  10. echo "Starting kvstore_over_socket"
  11. abci-cli kvstore > /dev/null &
  12. pid_kvstore=$!
  13. tendermint start --mode validator > tendermint.log &
  14. pid_tendermint=$!
  15. sleep 5
  16. echo "running test"
  17. bash test/app/kvstore_test.sh "KVStore over Socket"
  18. kill -9 $pid_kvstore $pid_tendermint
  19. }
  20. # start tendermint first
  21. function kvstore_over_socket_reorder(){
  22. rm -rf $TMHOME
  23. tendermint init validator
  24. echo "Starting kvstore_over_socket_reorder (ie. start tendermint first)"
  25. tendermint start --mode validator > tendermint.log &
  26. pid_tendermint=$!
  27. sleep 2
  28. abci-cli kvstore > /dev/null &
  29. pid_kvstore=$!
  30. sleep 5
  31. echo "running test"
  32. bash test/app/kvstore_test.sh "KVStore over Socket"
  33. kill -9 $pid_kvstore $pid_tendermint
  34. }
  35. case "$1" in
  36. "kvstore_over_socket")
  37. kvstore_over_socket
  38. ;;
  39. "kvstore_over_socket_reorder")
  40. kvstore_over_socket_reorder
  41. ;;
  42. *)
  43. echo "Running all"
  44. kvstore_over_socket
  45. echo ""
  46. kvstore_over_socket_reorder
  47. echo ""
  48. esac