diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 34f5aa95d..356fa8bf9 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -1,5 +1,5 @@ # Pull base image. -FROM golang:1.4 +FROM golang:1.6 ENV USER tmuser ENV DATA_ROOT /data/tendermint diff --git a/circle.yml b/circle.yml index b21e05b20..2c5075d45 100644 --- a/circle.yml +++ b/circle.yml @@ -2,11 +2,14 @@ machine: environment: GOPATH: /home/ubuntu/.go_workspace REPO: $GOPATH/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME + DOCKER_VERSION: 1.10.0 + DOCKER_MACHINE_VERSION: 0.6.0 hosts: circlehost: 127.0.0.1 localhost: 127.0.0.1 pre: - - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0 + - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- $DOCKER_VERSION + - curl -sSL -o /usr/bin/docker-machine https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine-linux-x86_64; sudo chmod 0755 /usr/bin/docker-machine services: - docker diff --git a/test/broadcast_tx/clean.sh b/test/app/clean.sh similarity index 100% rename from test/broadcast_tx/clean.sh rename to test/app/clean.sh diff --git a/test/broadcast_tx/counter_test.sh b/test/app/counter_test.sh similarity index 100% rename from test/broadcast_tx/counter_test.sh rename to test/app/counter_test.sh diff --git a/test/broadcast_tx/dummy_test.sh b/test/app/dummy_test.sh similarity index 100% rename from test/broadcast_tx/dummy_test.sh rename to test/app/dummy_test.sh diff --git a/test/broadcast_tx/test.sh b/test/app/test.sh similarity index 92% rename from test/broadcast_tx/test.sh rename to test/app/test.sh index ee31d34da..ce9fff8df 100644 --- a/test/broadcast_tx/test.sh +++ b/test/app/test.sh @@ -8,7 +8,7 @@ set -e # TODO: install everything -export TMROOT=$HOME/.tendermint_broadcast_tx +export TMROOT=$HOME/.tendermint_app function dummy_over_socket(){ rm -rf $TMROOT @@ -59,7 +59,7 @@ function counter_over_grpc() { kill -9 $pid_counter $pid_tendermint } -cd $GOPATH/src/github.com/tendermint/tendermint/test/broadcast_tx +cd $GOPATH/src/github.com/tendermint/tendermint/test/app case "$1" in "dummy_over_socket") diff --git a/test/net/test.sh b/test/net/test.sh new file mode 100644 index 000000000..c426e0ffa --- /dev/null +++ b/test/net/test.sh @@ -0,0 +1,23 @@ +#! /bin/bash +set -eu + +DATACENTER=single +VALSETSIZE=4 +BLOCKSIZE=8092 +TX_SIZE=200 +NTXS=$((BLOCKSIZE*4)) +MACH_PREFIX=mach +RESULTSDIR=results +CLOUD_PROVIDER=digitalocean + +export TMHEAD=`git rev-parse --abbrev-ref HEAD` +export TM_IMAGE="tendermint/tmbase" + +# not a go repo +set +e +go get github.com/tendermint/network_testing +set -e +cd $GOPATH/src/github.com/tendermint/network_testing +bash experiments/exp_throughput.sh $DATACENTER $VALSETSIZE $BLOCKSIZE $TX_SIZE $NTXS $MACH_PREFIX $RESULTSDIR $CLOUD_PROVIDER + +# TODO echo result! diff --git a/test/run_test.sh b/test/run_test.sh index a7de6a141..188c94f51 100644 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -9,14 +9,12 @@ echo "Current branch: $BRANCH" # go test --race github.com/tendermint/tendermint/... make test_race -# run the broadcast_tx tests -bash test/broadcast_tx/test.sh +# run the app tests +bash test/app/test.sh if [[ "$BRANCH" == "master" || "$BRANCH" == "staging" ]]; then echo "" echo "* branch $BRANCH; testing libs" # checkout every github.com/tendermint dir and run its tests bash test/test_libs.sh - - # TODO: mintnet/netmon fi diff --git a/test/test.sh b/test/test.sh index 83787f82b..99e1fcdfe 100644 --- a/test/test.sh +++ b/test/test.sh @@ -21,3 +21,10 @@ docker run -t tester bash test/run_test.sh echo "" echo "* running basic peer tests" bash test/p2p/test.sh tester + +BRANCH=`git rev-parse --abbrev-ref HEAD` +if [[ "$BRANCH" == "master" || "$BRANCH" == "staging" ]]; then + echo "" + echo "* branch $BRANCH; running mintnet/netmon throughput benchmark" + bash tests/net/test.sh +fi