tendermint/test/test.sh

31 lines
838 B
Bash
Raw Normal View History

2016-07-23 09:48:30 -07:00
#! /bin/bash
2016-07-23 16:38:44 -07:00
# integrations test
# this is the script run by eg CircleCI.
# It creates a docker container,
# installs the dependencies,
# and runs the tests.
# If we pushed to STAGING or MASTER,
# it will also run the tests for all dependencies
2016-07-24 11:08:47 -07:00
echo ""
echo "* building docker file"
2016-07-23 16:38:44 -07:00
docker build -t tester -f ./test/Dockerfile .
2016-07-24 11:08:47 -07:00
echo ""
echo "* running go tests and broadcast tests"
2016-07-23 16:38:44 -07:00
docker run -t tester bash test/run_test.sh
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 ""
echo "* running basic peer tests"
bash test/p2p/test.sh tester
BRANCH=`git rev-parse --abbrev-ref HEAD`
2016-08-05 16:15:14 -07:00
if [[ "$BRANCH" == "master" || $(echo "$BRANCH" | grep "release-") != "" ]]; then
echo ""
echo "* branch $BRANCH; running mintnet/netmon throughput benchmark"
bash tests/net/test.sh
fi