test: use glide with mintnet/netmon
This commit is contained in:
parent
f0871e4f5e
commit
de0fc87c1c
|
@ -6,6 +6,8 @@ RUN apt-get update && \
|
|||
apt-get install -y --no-install-recommends \
|
||||
jq bsdmainutils vim-common psmisc
|
||||
|
||||
# Setup tendermint repo with vendored dependencies
|
||||
# but without code - docker caching prevents reinstall on code change!
|
||||
ENV REPO $GOPATH/src/github.com/tendermint/tendermint
|
||||
WORKDIR $REPO
|
||||
ADD glide.yaml glide.yaml
|
||||
|
@ -13,6 +15,7 @@ ADD glide.lock glide.lock
|
|||
ADD Makefile Makefile
|
||||
RUN make get_vendor_deps
|
||||
|
||||
# Now copy in the code
|
||||
COPY . $REPO
|
||||
|
||||
RUN go install ./cmd/tendermint
|
||||
|
|
|
@ -20,17 +20,20 @@ set -u
|
|||
export TMHEAD=`git rev-parse --abbrev-ref HEAD`
|
||||
export TM_IMAGE="tendermint/tmbase"
|
||||
|
||||
# not a go repo
|
||||
# grab network monitor, install mintnet, netmon
|
||||
set +e
|
||||
go get github.com/tendermint/network_testing
|
||||
set -e
|
||||
|
||||
# install mintnet, netmon
|
||||
# TODO: specify branch
|
||||
|
||||
go get github.com/tendermint/mintnet
|
||||
go get github.com/tendermint/netmon
|
||||
set -e
|
||||
|
||||
# install vendored deps
|
||||
cd $GOPATH/src/github.com/tendermint/mintnet
|
||||
glide install
|
||||
go install
|
||||
cd $GOPATH/src/github.com/tendermint/netmon
|
||||
glide install
|
||||
go install
|
||||
|
||||
cd $GOPATH/src/github.com/tendermint/network_testing
|
||||
bash experiments/exp_throughput.sh $DATACENTER $VALSETSIZE $BLOCKSIZE $TX_SIZE $NTXS $MACH_PREFIX $RESULTSDIR $CLOUD_PROVIDER
|
||||
|
|
26
test/test.sh
26
test/test.sh
|
@ -8,19 +8,19 @@ echo ""
|
|||
echo "* building docker image"
|
||||
bash ./test/docker/build.sh
|
||||
|
||||
echo ""
|
||||
echo "* running go tests and app tests in docker container"
|
||||
docker run --name run_test -t tester bash test/run_test.sh
|
||||
|
||||
# copy the coverage results out of docker container
|
||||
docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt .
|
||||
|
||||
# test basic network connectivity
|
||||
# by starting a local testnet and checking peers connect and make blocks
|
||||
echo ""
|
||||
echo "* running p2p tests on a local docker network"
|
||||
bash test/p2p/test.sh tester
|
||||
|
||||
#echo ""
|
||||
#echo "* running go tests and app tests in docker container"
|
||||
#docker run --name run_test -t tester bash test/run_test.sh
|
||||
#
|
||||
## copy the coverage results out of docker container
|
||||
#docker cp run_test:/go/src/github.com/tendermint/tendermint/coverage.txt .
|
||||
#
|
||||
## test basic network connectivity
|
||||
## by starting a local testnet and checking peers connect and make blocks
|
||||
#echo ""
|
||||
#echo "* running p2p tests on a local docker network"
|
||||
#bash test/p2p/test.sh tester
|
||||
#
|
||||
# only run the cloud benchmark for releases
|
||||
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
||||
if [[ $(echo "$BRANCH" | grep "release-") != "" ]]; then
|
||||
|
|
|
@ -6,27 +6,6 @@ if [[ "$GLIDE" == "" ]]; then
|
|||
fi
|
||||
|
||||
# get vendored commit for given lib
|
||||
function parseGlide() {
|
||||
cat $1 | grep -A1 $2 | grep -v $2 | awk '{print $2}'
|
||||
}
|
||||
|
||||
# fetch and checkout vendored dep
|
||||
function getDep() {
|
||||
lib=$1
|
||||
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
|
||||
}
|
||||
|
||||
####################
|
||||
# libs we depend on
|
||||
|
@ -36,7 +15,9 @@ LIBS_GO_TEST=(go-clist go-common go-config go-crypto go-db go-events go-merkle g
|
|||
LIBS_MAKE_TEST=(go-rpc go-wire tmsp)
|
||||
|
||||
for lib in "${LIBS_GO_TEST[@]}"; do
|
||||
getDep $lib
|
||||
|
||||
# checkout vendored version of lib
|
||||
bash scripts/glide/checkout.sh $GLIDE $lib
|
||||
|
||||
echo "Testing $lib ..."
|
||||
go test --race github.com/tendermint/$lib/...
|
||||
|
@ -46,7 +27,6 @@ for lib in "${LIBS_GO_TEST[@]}"; do
|
|||
fi
|
||||
done
|
||||
|
||||
|
||||
for lib in "${LIBS_MAKE_TEST[@]}"; do
|
||||
getDep $lib
|
||||
|
||||
|
|
Loading…
Reference in New Issue