Add vagrant_test to Makefile for integration tests

This commit is contained in:
Ethan Frey
2017-12-08 18:36:58 +01:00
parent 5bcd95f01f
commit c771964a40
2 changed files with 15 additions and 5 deletions

View File

@@ -43,6 +43,12 @@ test_release:
test100:
@for i in {1..100}; do make test; done
vagrant_test:
vagrant up
vagrant ssh -c 'make install'
vagrant ssh -c 'make test_race'
vagrant ssh -c 'make test_integrations'
draw_deps:
# requires brew install graphviz or apt-get install graphviz
go get github.com/RobotsAndPencils/goviz

14
Vagrantfile vendored
View File

@@ -29,16 +29,20 @@ Vagrant.configure("2") do |config|
# needed for docker
usermod -a -G docker ubuntu
# use "EOF" not EOF to avoid variable substitution of $PATH
cat << "EOF" >> /home/ubuntu/.bash_profile
export PATH=$PATH:/usr/lib/go-1.9/bin:/home/ubuntu/go/bin
export GOPATH=/home/ubuntu/go
export LC_ALL=en_US.UTF-8
cd go/src/github.com/tendermint/tendermint
EOF
mkdir -p /home/ubuntu/go/bin
echo 'export PATH=$PATH:/usr/lib/go-1.9/bin:/home/ubuntu/go/bin' >> /home/ubuntu/.bash_profile
echo 'export GOPATH=/home/ubuntu/go' >> /home/ubuntu/.bash_profile
echo 'export LC_ALL=en_US.UTF-8' >> /home/ubuntu/.bash_profile
mkdir -p /home/ubuntu/go/src/github.com/tendermint
ln -s /vagrant /home/ubuntu/go/src/github.com/tendermint/tendermint
chown -R ubuntu:ubuntu /home/ubuntu/go
chown ubuntu:ubuntu /home/ubuntu/.bash_profile
# get all deps and tools, ready to install/test
su - ubuntu -c 'cd /home/ubuntu/go/src/github.com/tendermint/tendermint && make get_vendor_deps && make tools'