diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b991bcc4e..5fd2d982f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,15 +34,26 @@ Please don't make Pull Requests to `master`. ## Dependencies -We use [glide](https://github.com/masterminds/glide) to manage dependencies. -That said, the master branch of every Tendermint repository should just build with `go get`, which means they should be kept up-to-date with their dependencies so we can get away with telling people they can just `go get` our software. -Since some dependencies are not under our control, a third party may break our build, in which case we can fall back on `glide install`. Even for dependencies under our control, glide helps us keeps multiple repos in sync as they evolve. Anything with an executable, such as apps, tools, and the core, should use glide. +We use [dep](https://github.com/golang/dep) to manage dependencies. -Run `bash scripts/glide/status.sh` to get a list of vendored dependencies that may not be up-to-date. +That said, the master branch of every Tendermint repository should just build +with `go get`, which means they should be kept up-to-date with their +dependencies so we can get away with telling people they can just `go get` our +software. + +Since some dependencies are not under our control, a third party may break our +build, in which case we can fall back on `dep ensure` (or `make +get_vendor_deps`). Even for dependencies under our control, dep helps us to +keep multiple repos in sync as they evolve. Anything with an executable, such +as apps, tools, and the core, should use dep. + +Run `dep status` to get a list of vendored dependencies that may not be +up-to-date. ## Vagrant -If you are a [Vagrant](https://www.vagrantup.com/) user, you can get started hacking Tendermint with the commands below. +If you are a [Vagrant](https://www.vagrantup.com/) user, you can get started +hacking Tendermint with the commands below. NOTE: In case you installed Vagrant in 2017, you might need to run `vagrant box update` to upgrade to the latest `ubuntu/xenial64`. @@ -53,11 +64,14 @@ vagrant ssh make test ``` - ## Testing -All repos should be hooked up to circle. -If they have `.go` files in the root directory, they will be automatically tested by circle using `go test -v -race ./...`. If not, they will need a `circle.yml`. Ideally, every repo has a `Makefile` that defines `make test` and includes its continuous integration status using a badge in the `README.md`. +All repos should be hooked up to [CircleCI](https://circleci.com/). + +If they have `.go` files in the root directory, they will be automatically +tested by circle using `go test -v -race ./...`. If not, they will need a +`circle.yml`. Ideally, every repo has a `Makefile` that defines `make test` and +includes its continuous integration status using a badge in the `README.md`. ## Branching Model and Release diff --git a/DOCKER/Dockerfile.develop b/DOCKER/Dockerfile.develop index eb230047f..e6ee6607e 100644 --- a/DOCKER/Dockerfile.develop +++ b/DOCKER/Dockerfile.develop @@ -18,9 +18,9 @@ RUN mkdir -p /go/src/github.com/tendermint/tendermint && \ cd /go/src/github.com/tendermint/tendermint && \ git clone https://github.com/tendermint/tendermint . && \ git checkout develop && \ + make get_tools && \ make get_vendor_deps && \ make install && \ - glide cc && \ cd - && \ rm -rf /go/src/github.com/tendermint/tendermint && \ apk del go build-base git diff --git a/Gopkg.lock b/Gopkg.lock index 015f9a07b..b032f23c0 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -229,12 +229,11 @@ "client", "example/code", "example/counter", - "example/dummy", + "example/kvstore", "server", "types" ] - revision = "68592f4d8ee34e97db94b7a7976b1309efdb7eb9" - version = "v0.10.0" + revision = "345a5a5a34aa31ad00626266f59e4ae7652ee274" [[projects]] branch = "master" @@ -370,6 +369,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "fab03bd603ce6dc3139527674dcc4a5625e5ff81c6caafee4975b338daef696f" + inputs-digest = "402db24a8ce0cac835f1d0d3c40d4066d57660acac43b647066d94913bfc3efc" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index c468d75fa..875b84a4d 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -71,7 +71,7 @@ [[constraint]] name = "github.com/tendermint/abci" - version = "0.10.0" + revision = "345a5a5a34aa31ad00626266f59e4ae7652ee274" [[constraint]] name = "github.com/tendermint/go-crypto" diff --git a/Makefile b/Makefile index b3c2e03dc..712813de0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ GOTOOLS = \ github.com/golang/dep/cmd/dep \ - github.com/tendermint/glide \ # gopkg.in/alecthomas/gometalinter.v2 PACKAGES=$(shell go list ./... | grep -v '/vendor/') BUILD_TAGS?=tendermint @@ -58,7 +57,7 @@ get_vendor_deps: ensure_deps: @rm -rf vendor/ @echo "--> Running dep" - @dep ensure + @dep ensure draw_deps: @# requires brew install graphviz or apt-get install graphviz diff --git a/docs/abci-cli.rst b/docs/abci-cli.rst index c32a46f3f..9162682c3 100644 --- a/docs/abci-cli.rst +++ b/docs/abci-cli.rst @@ -16,15 +16,15 @@ Next, install the ``abci-cli`` tool and example applications: go get -u github.com/tendermint/abci/cmd/abci-cli -If this fails, you may need to use ``glide`` to get vendored +If this fails, you may need to use `dep `__ to get vendored dependencies: :: - go get github.com/Masterminds/glide cd $GOPATH/src/github.com/tendermint/abci - glide install - go install ./cmd/abci-cli + make get_tools + make get_vendor_deps + make install Now run ``abci-cli`` to see the list of commands: diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 2e80a8a8a..fe49e27b5 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -27,15 +27,15 @@ Then run go get -u github.com/tendermint/abci/cmd/abci-cli -If there is an error, install and run the ``glide`` tool to pin the +If there is an error, install and run the `dep `__ tool to pin the dependencies: :: - go get github.com/Masterminds/glide cd $GOPATH/src/github.com/tendermint/abci - glide install - go install ./cmd/abci-cli + make get_tools + make get_vendor_deps + make install Now you should have the ``abci-cli`` installed; you'll see a couple of commands (``counter`` and ``kvstore``) that are diff --git a/docs/install.rst b/docs/install.rst index b2fe7758e..4ee572604 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -9,7 +9,7 @@ To download pre-built binaries, see the `Download page `__, and the Tendermint source code. Install Go ^^^^^^^^^^ @@ -31,21 +31,21 @@ installation worked. If the installation failed, a dependency may have been updated and become incompatible with the latest Tendermint master branch. We solve this -using the ``glide`` tool for dependency management. +using the ``dep`` tool for dependency management. -First, install ``glide``: +First, install ``dep``: :: - go get github.com/Masterminds/glide + make get_tools Now we can fetch the correct versions of each dependency by running: :: cd $GOPATH/src/github.com/tendermint/tendermint - glide install - go install ./cmd/tendermint + make get_vendor_deps + make install Note that even though ``go get`` originally failed, the repository was still cloned to the correct location in the ``$GOPATH``. @@ -60,7 +60,7 @@ If you already have Tendermint installed, and you make updates, simply :: cd $GOPATH/src/github.com/tendermint/tendermint - go install ./cmd/tendermint + make install To upgrade, there are a few options: @@ -72,18 +72,18 @@ To upgrade, there are a few options: its dependencies - fetch and checkout the latest master branch in ``$GOPATH/src/github.com/tendermint/tendermint``, and then run - ``glide install && go install ./cmd/tendermint`` as above. + ``make get_vendor_deps && make install`` as above. Note the first two options should usually work, but may fail. If they -do, use ``glide``, as above: +do, use ``dep``, as above: :: cd $GOPATH/src/github.com/tendermint/tendermint - glide install - go install ./cmd/tendermint + make get_vendor_deps + make install -Since the third option just uses ``glide`` right away, it should always +Since the third option just uses ``dep`` right away, it should always work. Troubleshooting @@ -96,8 +96,8 @@ If ``go get`` failing bothers you, fetch the code using ``git``: mkdir -p $GOPATH/src/github.com/tendermint git clone https://github.com/tendermint/tendermint $GOPATH/src/github.com/tendermint/tendermint cd $GOPATH/src/github.com/tendermint/tendermint - glide install - go install ./cmd/tendermint + make get_vendor_deps + make install Run ^^^ diff --git a/glide.lock b/glide.lock deleted file mode 100644 index b68662652..000000000 --- a/glide.lock +++ /dev/null @@ -1,206 +0,0 @@ -hash: d9b29e999de7d8a58f068ad5c2af77a030d55418873489ffab9a142df6c31eed -updated: 2018-02-21T00:18:03.549434011-05:00 -imports: -- name: github.com/btcsuite/btcd - version: 50de9da05b50eb15658bb350f6ea24368a111ab7 - subpackages: - - btcec -- name: github.com/ebuchman/fail-test - version: 95f809107225be108efcf10a3509e4ea6ceef3c4 -- name: github.com/fsnotify/fsnotify - version: c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9 -- name: github.com/go-kit/kit - version: 4dc7be5d2d12881735283bcab7352178e190fc71 - subpackages: - - log - - log/level - - log/term -- name: github.com/go-logfmt/logfmt - version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5 -- name: github.com/go-stack/stack - version: 259ab82a6cad3992b4e21ff5cac294ccb06474bc -- name: github.com/gogo/protobuf - version: 1adfc126b41513cc696b209667c8656ea7aac67c - subpackages: - - gogoproto - - jsonpb - - proto - - protoc-gen-gogo/descriptor - - sortkeys - - types -- name: github.com/golang/protobuf - version: 925541529c1fa6821df4e44ce2723319eb2be768 - subpackages: - - proto - - ptypes - - ptypes/any - - ptypes/duration - - ptypes/timestamp -- name: github.com/golang/snappy - version: 553a641470496b2327abcac10b36396bd98e45c9 -- name: github.com/gorilla/websocket - version: ea4d1f681babbce9545c9c5f3d5194a789c89f5b -- name: github.com/hashicorp/hcl - version: 23c074d0eceb2b8a5bfdbb271ab780cde70f05a8 - subpackages: - - hcl/ast - - hcl/parser - - hcl/scanner - - hcl/strconv - - hcl/token - - json/parser - - json/scanner - - json/token -- name: github.com/inconshreveable/mousetrap - version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 -- name: github.com/jmhodges/levigo - version: c42d9e0ca023e2198120196f842701bb4c55d7b9 -- name: github.com/kr/logfmt - version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0 -- name: github.com/magiconair/properties - version: 49d762b9817ba1c2e9d0c69183c2b4a8b8f1d934 -- name: github.com/mitchellh/mapstructure - version: b4575eea38cca1123ec2dc90c26529b5c5acfcff -- name: github.com/pelletier/go-toml - version: acdc4509485b587f5e675510c4f2c63e90ff68a8 -- name: github.com/pkg/errors - version: 645ef00459ed84a119197bfb8d8205042c6df63d -- name: github.com/rcrowley/go-metrics - version: 8732c616f52954686704c8645fe1a9d59e9df7c1 -- name: github.com/spf13/afero - version: bb8f1927f2a9d3ab41c9340aa034f6b803f4359c - subpackages: - - mem -- name: github.com/spf13/cast - version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 -- name: github.com/spf13/cobra - version: 7b2c5ac9fc04fc5efafb60700713d4fa609b777b -- name: github.com/spf13/jwalterweatherman - version: 7c0cea34c8ece3fbeb2b27ab9b59511d360fb394 -- name: github.com/spf13/pflag - version: e57e3eeb33f795204c1ca35f56c44f83227c6e66 -- name: github.com/spf13/viper - version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 -- name: github.com/syndtr/goleveldb - version: 34011bf325bce385408353a30b101fe5e923eb6e - subpackages: - - leveldb - - leveldb/cache - - leveldb/comparer - - leveldb/errors - - leveldb/filter - - leveldb/iterator - - leveldb/journal - - leveldb/memdb - - leveldb/opt - - leveldb/storage - - leveldb/table - - leveldb/util -- name: github.com/tendermint/abci - version: 6d47f4afe2b68b20802aa4d049fd6b8c0f54f1a5 - subpackages: - - client - - example/code - - example/counter - - example/kvstore - - server - - types -- name: github.com/tendermint/ed25519 - version: d8387025d2b9d158cf4efb07e7ebf814bcce2057 - subpackages: - - edwards25519 - - extra25519 -- name: github.com/tendermint/go-crypto - version: dd20358a264c772b4a83e477b0cfce4c88a7001d -- name: github.com/tendermint/go-wire - version: b6fc872b42d41158a60307db4da051dd6f179415 - subpackages: - - data -- name: github.com/tendermint/tmlibs - version: 1b9b5652a199ab0be2e781393fb275b66377309d - subpackages: - - autofile - - cli - - cli/flags - - clist - - common - - db - - flowrate - - log - - merkle - - pubsub - - pubsub/query - - test -- name: golang.org/x/crypto - version: 1875d0a70c90e57f11972aefd42276df65e895b9 - subpackages: - - curve25519 - - nacl/box - - nacl/secretbox - - openpgp/armor - - openpgp/errors - - poly1305 - - ripemd160 - - salsa20/salsa -- name: golang.org/x/net - version: 2fb46b16b8dda405028c50f7c7f0f9dd1fa6bfb1 - subpackages: - - context - - http2 - - http2/hpack - - idna - - internal/timeseries - - lex/httplex - - trace -- name: golang.org/x/sys - version: 37707fdb30a5b38865cfb95e5aab41707daec7fd - subpackages: - - unix -- name: golang.org/x/text - version: e19ae1496984b1c655b8044a65c0300a3c878dd3 - subpackages: - - secure/bidirule - - transform - - unicode/bidi - - unicode/norm -- name: google.golang.org/genproto - version: 4eb30f4778eed4c258ba66527a0d4f9ec8a36c45 - subpackages: - - googleapis/rpc/status -- name: google.golang.org/grpc - version: 401e0e00e4bb830a10496d64cd95e068c5bf50de - subpackages: - - balancer - - codes - - connectivity - - credentials - - grpclb/grpc_lb_v1/messages - - grpclog - - internal - - keepalive - - metadata - - naming - - peer - - resolver - - stats - - status - - tap - - transport -- name: gopkg.in/yaml.v2 - version: d670f9405373e636a5a2765eea47fac0c9bc91a4 -testImports: -- name: github.com/davecgh/go-spew - version: 346938d642f2ec3594ed81d874461961cd0faa76 - subpackages: - - spew -- name: github.com/fortytw2/leaktest - version: 3b724c3d7b8729a35bf4e577f71653aec6e53513 -- name: github.com/pmezard/go-difflib - version: 792786c7400a136282c1664665ae0a8db921c6c2 - subpackages: - - difflib -- name: github.com/stretchr/testify - version: 12b6f73e6084dad08a7c6e575284b177ecafbc71 - subpackages: - - assert - - require diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index 236bd78b6..000000000 --- a/glide.yaml +++ /dev/null @@ -1,63 +0,0 @@ -package: github.com/tendermint/tendermint -import: -- package: github.com/ebuchman/fail-test -- package: github.com/gogo/protobuf - version: ^1.0.0 - subpackages: - - proto -- package: github.com/golang/protobuf - version: ^1.0.0 - subpackages: - - proto -- package: github.com/gorilla/websocket - version: v1.2.0 -- package: github.com/pkg/errors - version: ~0.8.0 -- package: github.com/rcrowley/go-metrics -- package: github.com/spf13/cobra - version: v0.0.1 -- package: github.com/spf13/viper - version: v1.0.0 -- package: github.com/tendermint/abci - version: develop - subpackages: - - client - - example/kvstore - - types -- package: github.com/tendermint/go-crypto - version: 0.4.1 -- package: github.com/tendermint/go-wire - version: 0.7.2 - subpackages: - - data -- package: github.com/tendermint/tmlibs - version: 0.7.0 - subpackages: - - autofile - - cli - - cli/flags - - clist - - common - - db - - flowrate - - log - - merkle - - pubsub - - pubsub/query -- package: golang.org/x/crypto - subpackages: - - nacl/box - - nacl/secretbox - - ripemd160 -- package: google.golang.org/grpc - version: v1.7.3 -testImport: -- package: github.com/fortytw2/leaktest -- package: github.com/go-kit/kit - version: ^0.6.0 - subpackages: - - log/term -- package: github.com/stretchr/testify - subpackages: - - assert - - require diff --git a/scripts/dep_utils/checkout.sh b/scripts/dep_utils/checkout.sh new file mode 100644 index 000000000..c88c3e807 --- /dev/null +++ b/scripts/dep_utils/checkout.sh @@ -0,0 +1,33 @@ +#! /bin/bash + +set +u +if [[ "$DEP" == "" ]]; then + DEP=$GOPATH/src/github.com/tendermint/tendermint/Gopkg.lock +fi +set -u + + +set -u + +function getVendoredVersion() { + grep -A100 "$LIB" "$DEP" | grep revision | head -n1 | grep -o '"[^"]\+"' | cut -d '"' -f 2 +} + + +# fetch and checkout vendored dep + +lib=$1 + +echo "----------------------------------" +echo "Getting $lib ..." +go get -t "github.com/tendermint/$lib/..." + +VENDORED=$(getVendoredVersion "$lib") +cd "$GOPATH/src/github.com/tendermint/$lib" || exit +MASTER=$(git rev-parse origin/master) + +if [[ "$VENDORED" != "$MASTER" ]]; then + echo "... VENDORED != MASTER ($VENDORED != $MASTER)" + echo "... Checking out commit $VENDORED" + git checkout "$VENDORED" &> /dev/null +fi diff --git a/scripts/dep_utils/parse.sh b/scripts/dep_utils/parse.sh new file mode 100644 index 000000000..e6519efa0 --- /dev/null +++ b/scripts/dep_utils/parse.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +set +u +if [[ "$DEP" == "" ]]; then + DEP=$GOPATH/src/github.com/tendermint/tendermint/Gopkg.lock +fi +set -u + + +set -euo pipefail + +LIB=$1 + +grep -A100 "$LIB" "$DEP" | grep revision | head -n1 | grep -o '"[^"]\+"' | cut -d '"' -f 2 diff --git a/scripts/glide/checkout.sh b/scripts/glide/checkout.sh deleted file mode 100644 index 4dcc243ca..000000000 --- a/scripts/glide/checkout.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash -set -u - -function parseGlide() { - cat $1 | grep -A1 $2 | grep -v $2 | awk '{print $2}' -} - - -# fetch and checkout vendored dep - -glide=$1 -lib=$2 - -echo "----------------------------------" -echo "Getting $lib ..." -go get -t github.com/tendermint/$lib/... - -VENDORED=$(parseGlide $glide $lib) -cd $GOPATH/src/github.com/tendermint/$lib -MASTER=$(git rev-parse origin/master) - -if [[ "$VENDORED" != "$MASTER" ]]; then - echo "... VENDORED != MASTER ($VENDORED != $MASTER)" - echo "... Checking out commit $VENDORED" - git checkout $VENDORED &> /dev/null -fi - diff --git a/scripts/glide/parse.sh b/scripts/glide/parse.sh deleted file mode 100644 index e559c368e..000000000 --- a/scripts/glide/parse.sh +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/bash - -set +u -if [[ "$GLIDE" == "" ]]; then - GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock -fi -set -u - -set -euo pipefail - -LIB=$1 - -cat $GLIDE | grep -A1 $LIB | grep -v $LIB | awk '{print $2}' diff --git a/scripts/glide/status.sh b/scripts/glide/status.sh deleted file mode 100644 index 40503dbda..000000000 --- a/scripts/glide/status.sh +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/bash - -# for every github.com/tendermint dependency, warn is if its not synced with origin/master - -if [[ "$GLIDE" == "" ]]; then - GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock -fi - -# make list of libs -LIBS=($(grep "github.com/tendermint" $GLIDE | awk '{print $3}')) - - -UPTODATE=true -for lib in "${LIBS[@]}"; do - # get vendored commit - VENDORED=`grep -A1 $lib $GLIDE | grep -v $lib | awk '{print $2}'` - PWD=`pwd` - cd $GOPATH/src/$lib - MASTER=`git rev-parse origin/master` - HEAD=`git rev-parse HEAD` - cd $PWD - - if [[ "$VENDORED" != "$MASTER" ]]; then - UPTODATE=false - echo "" - if [[ "$VENDORED" != "$HEAD" ]]; then - echo "Vendored version of $lib differs from origin/master and HEAD" - echo "Vendored: $VENDORED" - echo "Master: $MASTER" - echo "Head: $HEAD" - else - echo "Vendored version of $lib differs from origin/master but matches HEAD" - echo "Vendored: $VENDORED" - echo "Master: $MASTER" - fi - elif [[ "$VENDORED" != "$HEAD" ]]; then - echo "" - echo "Vendored version of $lib matches origin/master but differs from HEAD" - echo "Vendored: $VENDORED" - echo "Head: $HEAD" - fi -done - -if [[ "$UPTODATE" == "true" ]]; then - echo "All vendored versions up to date" -fi - diff --git a/scripts/glide/update.sh b/scripts/glide/update.sh deleted file mode 100644 index 1c0936f28..000000000 --- a/scripts/glide/update.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/bash -set -euo pipefail -IFS=$'\n\t' - -# script to update the given dependency in the glide.lock file with the checked out branch on the local host - -LIB=$1 - -TMCORE=$GOPATH/src/github.com/tendermint/tendermint -set +u -if [[ "$GLIDE" == "" ]]; then - GLIDE=$TMCORE/glide.lock -fi -set -u - -OLD_COMMIT=`bash $TMCORE/scripts/glide/parse.sh $LIB` - -PWD=`pwd` -cd $GOPATH/src/github.com/tendermint/$LIB - -NEW_COMMIT=$(git rev-parse HEAD) - -cd $PWD - -uname -a | grep Linux > /dev/null -if [[ "$?" == 0 ]]; then - # linux - sed -i "s/$OLD_COMMIT/$NEW_COMMIT/g" $GLIDE -else - # mac - sed -i "" "s/$OLD_COMMIT/$NEW_COMMIT/g" $GLIDE -fi diff --git a/scripts/install_abci_apps.sh b/scripts/install_abci_apps.sh index b2c0b085b..eb70070df 100644 --- a/scripts/install_abci_apps.sh +++ b/scripts/install_abci_apps.sh @@ -1,13 +1,12 @@ #! /bin/bash -go get -d github.com/tendermint/abci - # get the abci commit used by tendermint -COMMIT=`bash scripts/glide/parse.sh abci` - +COMMIT=$(bash scripts/dep_utils/parse.sh abci) echo "Checking out vendored commit for abci: $COMMIT" -cd $GOPATH/src/github.com/tendermint/abci -git checkout $COMMIT -glide install -go install ./cmd/... +go get -d github.com/tendermint/abci +cd "$GOPATH/src/github.com/tendermint/abci" || exit +git checkout "$COMMIT" +make get_tools +make get_vendor_deps +make install diff --git a/test/README.md b/test/README.md index d948083f2..d9f09fef7 100644 --- a/test/README.md +++ b/test/README.md @@ -23,8 +23,3 @@ and run the following tests in docker containers: If on a `release-x.x.x` branch, we also run - `go test` for all our dependency libs (test/test_libs.sh) -- network_testing - benchmark a mintnet based cloud deploy using netmon - - - - diff --git a/test/net/setup.sh b/test/net/setup.sh deleted file mode 100644 index 148a3c4b7..000000000 --- a/test/net/setup.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash -set -eu - -# grab glide for dependency mgmt -go get github.com/Masterminds/glide - -# grab network monitor, install mintnet, netmon -# these might err -echo "... fetching repos. ignore go get errors" -set +e -go get github.com/tendermint/network_testing -go get github.com/tendermint/mintnet -go get github.com/tendermint/netmon -set -e - -# install vendored deps -echo "GOPATH $GOPATH" - -cd $GOPATH/src/github.com/tendermint/mintnet -echo "... install mintnet dir $(pwd)" -glide install -go install -cd $GOPATH/src/github.com/tendermint/netmon -echo "... install netmon dir $(pwd)" -glide install -go install diff --git a/test/net/start.sh b/test/net/start.sh deleted file mode 100644 index 9e9ea3a0d..000000000 --- a/test/net/start.sh +++ /dev/null @@ -1,29 +0,0 @@ -#! /bin/bash -set -eu - -# start a testnet and benchmark throughput using mintnet+netmon via the network_testing repo - -DATACENTER=single -VALSETSIZE=4 -BLOCKSIZE=8092 -TX_SIZE=200 -NTXS=$((BLOCKSIZE*4)) -RESULTSDIR=results -CLOUD_PROVIDER=digitalocean - -set +u -if [[ "$MACH_PREFIX" == "" ]]; then - MACH_PREFIX=mach -fi -set -u - -cd "$GOPATH/src/github.com/tendermint/network_testing" -echo "... running network test $(pwd)" -TMHEAD=$(git rev-parse --abbrev-ref HEAD) TM_IMAGE="tendermint/tendermint" bash experiments/exp_throughput.sh $DATACENTER $VALSETSIZE $BLOCKSIZE $TX_SIZE $NTXS $MACH_PREFIX $RESULTSDIR $CLOUD_PROVIDER - -# TODO: publish result! - -# cleanup - -echo "... destroying machines" -mintnet destroy --machines $MACH_PREFIX[1-$VALSETSIZE] diff --git a/test/net/test.sh b/test/net/test.sh deleted file mode 100644 index 19147eb83..000000000 --- a/test/net/test.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash -set -eu - -# install mintnet, netmon, fetch network_testing -bash test/net/setup.sh - -# start the testnet -bash test/net/start.sh diff --git a/test/test.sh b/test/test.sh index 64d7bfc71..d0fafb5ee 100755 --- a/test/test.sh +++ b/test/test.sh @@ -48,13 +48,3 @@ docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt . echo echo "* [$(date +"%T")] running p2p tests on a local docker network" bash "$DIR/p2p/test.sh" tester - -# only run the cloud benchmark for releases -BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [[ $(echo "$BRANCH" | grep "release-") != "" ]]; then - echo - echo "TODO: run network tests" - #echo "* branch $BRANCH; running mintnet/netmon throughput benchmark" - # TODO: replace mintnet - #bash "$DIR/net/test.sh" -fi diff --git a/test/test_libs.sh b/test/test_libs.sh index 0a8485340..27ab27496 100644 --- a/test/test_libs.sh +++ b/test/test_libs.sh @@ -1,25 +1,20 @@ #! /bin/bash set -e -# set glide.lock path -if [[ "$GLIDE" == "" ]]; then - GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock -fi - -# get vendored commit for given lib +# Get the parent directory of where this script is. +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done +DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" #################### # libs we depend on #################### # All libs should define `make test` and `make get_vendor_deps` -LIBS_TEST=(tmlibs go-wire go-crypto abci) - -DIR=$(pwd) -for lib in "${LIBS_MAKE_TEST[@]}"; do - +LIBS=(tmlibs go-wire go-crypto abci) +for lib in "${LIBS[@]}"; do # checkout vendored version of lib - bash scripts/glide/checkout.sh "$GLIDE" "$lib" + bash scripts/dep_utils/checkout.sh "$lib" echo "Testing $lib ..." cd "$GOPATH/src/github.com/tendermint/$lib"