2016-07-23 09:48:30 -07:00
|
|
|
#! /bin/bash
|
2016-08-09 22:15:59 -07:00
|
|
|
set -eu
|
2016-07-23 09:48:30 -07:00
|
|
|
|
2016-08-06 20:30:46 -07:00
|
|
|
# Top Level Testing Script
|
|
|
|
# See the github.com/tendermint/tendermint/test/README.md
|
2016-07-23 16:38:44 -07:00
|
|
|
|
2016-07-24 11:08:47 -07:00
|
|
|
echo ""
|
2016-08-25 15:27:21 -07:00
|
|
|
echo "* building docker image"
|
|
|
|
bash ./test/docker/build.sh
|
2016-07-24 11:08:47 -07:00
|
|
|
|
|
|
|
echo ""
|
2016-08-25 15:27:21 -07:00
|
|
|
echo "* running go tests and app tests in docker container"
|
2017-01-12 20:11:38 -08:00
|
|
|
# sometimes its helpful to mount the local test folder
|
|
|
|
# -v $GOPATH/src/github.com/tendermint/tendermint/test:/go/src/github.com/tendermint/tendermint/test
|
2016-09-25 02:02:54 -07:00
|
|
|
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 .
|
2016-07-24 11:08:47 -07:00
|
|
|
|
|
|
|
# test basic network connectivity
|
|
|
|
# by starting a local testnet and checking peers connect and make blocks
|
|
|
|
echo ""
|
2016-08-25 15:27:21 -07:00
|
|
|
echo "* running p2p tests on a local docker network"
|
2016-07-24 11:08:47 -07:00
|
|
|
bash test/p2p/test.sh tester
|
2016-08-05 15:21:39 -07:00
|
|
|
|
2016-08-06 20:30:46 -07:00
|
|
|
# only run the cloud benchmark for releases
|
2016-08-05 15:21:39 -07:00
|
|
|
BRANCH=`git rev-parse --abbrev-ref HEAD`
|
2016-08-06 20:30:46 -07:00
|
|
|
if [[ $(echo "$BRANCH" | grep "release-") != "" ]]; then
|
2016-08-05 15:21:39 -07:00
|
|
|
echo ""
|
2017-01-13 00:57:46 -08:00
|
|
|
echo "TODO: run network tests"
|
|
|
|
#echo "* branch $BRANCH; running mintnet/netmon throughput benchmark"
|
|
|
|
# TODO: replace mintnet
|
|
|
|
#bash test/net/test.sh
|
2016-08-05 15:21:39 -07:00
|
|
|
fi
|