tendermint/test/test.sh

31 lines
838 B
Bash
Raw Normal View History

2016-07-23 12:48:30 -04:00
#! /bin/bash
2016-07-23 19:38:44 -04: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 14:08:47 -04:00
echo ""
echo "* building docker file"
2016-07-23 19:38:44 -04:00
docker build -t tester -f ./test/Dockerfile .
2016-07-24 14:08:47 -04:00
echo ""
echo "* running go tests and broadcast tests"
2016-07-23 19:38:44 -04:00
docker run -t tester bash test/run_test.sh
2016-07-24 14:08:47 -04: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 19:15:14 -04:00
if [[ "$BRANCH" == "master" || $(echo "$BRANCH" | grep "release-") != "" ]]; then
echo ""
echo "* branch $BRANCH; running mintnet/netmon throughput benchmark"
bash tests/net/test.sh
fi