tendermint/test/test_libs.sh

32 lines
683 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
2018-02-27 05:20:56 -08:00
# 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 )"
2016-07-23 09:48:30 -07:00
####################
# libs we depend on
####################
2017-04-25 15:35:22 -07:00
# All libs should define `make test` and `make get_vendor_deps`
2018-02-27 05:20:56 -08:00
LIBS=(tmlibs go-wire go-crypto abci)
for lib in "${LIBS[@]}"; do
2016-12-08 22:28:08 -08:00
# checkout vendored version of lib
2018-02-27 05:20:56 -08:00
bash scripts/dep_utils/checkout.sh "$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"