From c771964a40245b2350861832df08b3a780cbc520 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Fri, 8 Dec 2017 18:36:58 +0100 Subject: [PATCH] Add vagrant_test to Makefile for integration tests --- Makefile | 6 ++++++ Vagrantfile | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2ed827ed5..4c835a8f5 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Vagrantfile b/Vagrantfile index a3dd9449a..c81f9d06f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -29,16 +29,20 @@ Vagrant.configure("2") do |config| # needed for docker usermod -a -G docker ubuntu - 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 + # 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 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'