test: use glide with mintnet/netmon

This commit is contained in:
Ethan Buchman
2016-10-12 12:28:34 -04:00
parent f0871e4f5e
commit de0fc87c1c
4 changed files with 28 additions and 42 deletions
+3 -23
View File
@@ -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