Browse Source

Merge pull request #437 from tendermint/feature/431-data-flag

rename TMROOT to TMHOME
pull/432/merge
Ethan Buchman 8 years ago
committed by GitHub
parent
commit
c1dc1a1a45
9 changed files with 25 additions and 20 deletions
  1. +1
    -1
      DOCKER/Dockerfile
  2. +1
    -1
      DOCKER/Dockerfile.develop
  3. +3
    -3
      Makefile
  4. +4
    -0
      config/tendermint/config.go
  5. +6
    -6
      test/app/test.sh
  6. +1
    -1
      test/p2p/README.md
  7. +3
    -2
      test/p2p/peer.sh
  8. +3
    -3
      test/persist/test_failure_indices.sh
  9. +3
    -3
      test/persist/test_simple.sh

+ 1
- 1
DOCKER/Dockerfile View File

@ -10,7 +10,7 @@ ENV TM_SHA256SUM 697033ea0f34f8b34a8a2b74c4dd730b47dd4efcfce65e53e953bdae8eb1436
#
# The /tendermint/data dir is used by tendermint to store state.
ENV DATA_ROOT /tendermint
ENV TMROOT $DATA_ROOT
ENV TMHOME $DATA_ROOT
# Set user right away for determinism
RUN addgroup tmuser && \


+ 1
- 1
DOCKER/Dockerfile.develop View File

@ -1,7 +1,7 @@
FROM alpine:3.5
ENV DATA_ROOT /tendermint
ENV TMROOT $DATA_ROOT
ENV TMHOME $DATA_ROOT
RUN addgroup tmuser && \
adduser -S -G tmuser tmuser


+ 3
- 3
Makefile View File

@ -3,7 +3,7 @@ GOTOOLS = \
github.com/Masterminds/glide
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
BUILD_TAGS?=tendermint
TMROOT = $${TMROOT:-$$HOME/.tendermint}
TMHOME = $${TMHOME:-$$HOME/.tendermint}
all: install test
@ -61,8 +61,8 @@ update_deps: tools
@go get -d -u ./...
revision:
-echo `git rev-parse --verify HEAD` > $(TMROOT)/revision
-echo `git rev-parse --verify HEAD` >> $(TMROOT)/revision_history
-echo `git rev-parse --verify HEAD` > $(TMHOME)/revision
-echo `git rev-parse --verify HEAD` >> $(TMHOME)/revision_history
tools:
go get -u -v $(GOTOOLS)


+ 4
- 0
config/tendermint/config.go View File

@ -11,6 +11,10 @@ import (
func getTMRoot(rootDir string) string {
if rootDir == "" {
rootDir = os.Getenv("TMHOME")
}
if rootDir == "" {
// deprecated, use TMHOME (TODO: remove in TM 0.11.0)
rootDir = os.Getenv("TMROOT")
}
if rootDir == "" {


+ 6
- 6
test/app/test.sh View File

@ -8,10 +8,10 @@ set -e
# TODO: install everything
export TMROOT=$HOME/.tendermint_app
export TMHOME=$HOME/.tendermint_app
function dummy_over_socket(){
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
echo "Starting dummy_over_socket"
dummy > /dev/null &
@ -28,7 +28,7 @@ function dummy_over_socket(){
# start tendermint first
function dummy_over_socket_reorder(){
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
echo "Starting dummy_over_socket_reorder (ie. start tendermint first)"
tendermint node > tendermint.log &
@ -46,7 +46,7 @@ function dummy_over_socket_reorder(){
function counter_over_socket() {
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
echo "Starting counter_over_socket"
counter --serial > /dev/null &
@ -62,7 +62,7 @@ function counter_over_socket() {
}
function counter_over_grpc() {
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
echo "Starting counter_over_grpc"
counter --serial --abci grpc > /dev/null &
@ -78,7 +78,7 @@ function counter_over_grpc() {
}
function counter_over_grpc_grpc() {
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
echo "Starting counter_over_grpc_grpc (ie. with grpc broadcast_tx)"
counter --serial --abci grpc > /dev/null &


+ 1
- 1
test/p2p/README.md View File

@ -37,7 +37,7 @@ for i in $(seq 1 4); do
--ip="172.57.0.$((100 + $i))" \
--name local_testnet_$i \
--entrypoint tendermint \
-e TMROOT=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$i/core \
-e TMHOME=/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$i/core \
tendermint_tester node --seeds 172.57.0.101:46656,172.57.0.102:46656,172.57.0.103:46656,172.57.0.104:46656 --proxy_app=dummy
done
```


+ 3
- 2
test/p2p/peer.sh View File

@ -21,7 +21,7 @@ if [[ "$CIRCLECI" == true ]]; then
--ip=$(test/p2p/ip.sh $ID) \
--name "local_testnet_$ID" \
--entrypoint tendermint \
-e TMROOT="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
-e TMHOME="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
--log-driver=syslog \
--log-opt syslog-address=udp://127.0.0.1:5514 \
--log-opt syslog-facility=daemon \
@ -34,6 +34,7 @@ else
--ip=$(test/p2p/ip.sh $ID) \
--name "local_testnet_$ID" \
--entrypoint tendermint \
-e TMROOT="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
-e TMHOME="/go/src/github.com/tendermint/tendermint/test/p2p/data/mach$ID/core" \
"$DOCKER_IMAGE" node $NODE_FLAGS --log_level=info --proxy_app="$APP_PROXY"
fi

+ 3
- 3
test/persist/test_failure_indices.sh View File

@ -1,15 +1,15 @@
#! /bin/bash
export TMROOT=$HOME/.tendermint_persist
export TMHOME=$HOME/.tendermint_persist
rm -rf "$TMROOT"
rm -rf "$TMHOME"
tendermint init
# use a unix socket so we can remove it
RPC_ADDR="$(pwd)/rpc.sock"
TM_CMD="tendermint node --log_level=debug --rpc_laddr=unix://$RPC_ADDR" # &> tendermint_${name}.log"
DUMMY_CMD="dummy --persist $TMROOT/dummy" # &> dummy_${name}.log"
DUMMY_CMD="dummy --persist $TMHOME/dummy" # &> dummy_${name}.log"
function start_procs(){


+ 3
- 3
test/persist/test_simple.sh View File

@ -1,15 +1,15 @@
#! /bin/bash
export TMROOT=$HOME/.tendermint_persist
export TMHOME=$HOME/.tendermint_persist
rm -rf $TMROOT
rm -rf $TMHOME
tendermint init
function start_procs(){
name=$1
echo "Starting persistent dummy and tendermint"
dummy --persist $TMROOT/dummy &> "dummy_${name}.log" &
dummy --persist $TMHOME/dummy &> "dummy_${name}.log" &
PID_DUMMY=$!
tendermint node &> tendermint_${name}.log &
PID_TENDERMINT=$!


Loading…
Cancel
Save