tendermint/test/test_libs.sh

37 lines
675 B
Bash
Raw Normal View History

2016-07-23 09:48:30 -07:00
#! /bin/bash
2016-12-08 22:28:08 -08:00
set -e
2016-07-23 09:48:30 -07:00
# set glide.lock path
if [[ "$GLIDE" == "" ]]; then
GLIDE=$GOPATH/src/github.com/tendermint/tendermint/glide.lock
fi
# get vendored commit for given lib
####################
# libs we depend on
####################
2017-04-25 15:35:22 -07:00
# All libs should define `make test` and `make get_vendor_deps`
LIBS_TEST=(tmlibs go-wire go-crypto abci)
2016-07-23 09:48:30 -07:00
2017-02-20 15:51:00 -08:00
DIR=$(pwd)
2016-07-23 09:48:30 -07:00
for lib in "${LIBS_MAKE_TEST[@]}"; do
2016-12-08 22:28:08 -08:00
# checkout vendored version of lib
2017-02-20 15:51:00 -08:00
bash scripts/glide/checkout.sh "$GLIDE" "$lib"
2016-07-23 09:48:30 -07:00
echo "Testing $lib ..."
2017-02-20 15:51:00 -08:00
cd "$GOPATH/src/github.com/tendermint/$lib"
2017-04-25 15:35:22 -07:00
make get_vendor_deps
2016-07-23 09:48:30 -07:00
make test
if [[ "$?" != 0 ]]; then
echo "FAIL"
exit 1
fi
2017-02-20 15:51:00 -08:00
cd "$DIR"
2016-07-23 09:48:30 -07:00
done
echo ""
echo "PASS"