2016-07-23 12:48:30 -04:00
|
|
|
#! /bin/bash
|
2018-03-06 15:32:52 +01:00
|
|
|
set -ex
|
|
|
|
|
|
|
|
export PATH="$GOBIN:$PATH"
|
2016-07-23 12:48:30 -04:00
|
|
|
|
2018-02-27 17:20:56 +04: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 12:48:30 -04:00
|
|
|
|
|
|
|
####################
|
|
|
|
# libs we depend on
|
|
|
|
####################
|
|
|
|
|
2017-04-25 18:35:22 -04:00
|
|
|
# All libs should define `make test` and `make get_vendor_deps`
|
2018-02-27 17:20:56 +04:00
|
|
|
LIBS=(tmlibs go-wire go-crypto abci)
|
|
|
|
for lib in "${LIBS[@]}"; do
|
2016-12-09 01:28:08 -05:00
|
|
|
# checkout vendored version of lib
|
2018-02-27 17:20:56 +04:00
|
|
|
bash scripts/dep_utils/checkout.sh "$lib"
|
2016-07-23 12:48:30 -04:00
|
|
|
|
|
|
|
echo "Testing $lib ..."
|
2017-02-20 18:51:00 -05:00
|
|
|
cd "$GOPATH/src/github.com/tendermint/$lib"
|
2018-03-06 15:32:52 +01:00
|
|
|
make get_tools
|
2017-04-25 18:35:22 -04:00
|
|
|
make get_vendor_deps
|
2016-07-23 12:48:30 -04:00
|
|
|
make test
|
|
|
|
if [[ "$?" != 0 ]]; then
|
|
|
|
echo "FAIL"
|
|
|
|
exit 1
|
|
|
|
fi
|
2017-02-20 18:51:00 -05:00
|
|
|
cd "$DIR"
|
2016-07-23 12:48:30 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "PASS"
|