From 0be578f0b5baef8ea664772aaa6e7ffbbbb7f567 Mon Sep 17 00:00:00 2001 From: Cuong Nguyen Date: Tue, 7 Feb 2017 08:24:58 +0700 Subject: [PATCH] Install python2 for Ubuntu 16.04 and CentOS 7 in Vagrant - Fix wrong place to run script in Vagrantfile - Install python2 for Ubuntu 16.04 and CentOS 7 before executing run_tests.sh Change-Id: I6523d9d6dffcec53ca7511a5735490bd5e0acd27 --- Vagrantfile | 2 +- run_tests.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index e6e086b..c61f575 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -21,7 +21,7 @@ Vagrant.configure(2) do |config| end centos7.vm.provision "shell", inline: <<-SHELL sudo su - - cd /home/vagrant/sync + cd /vagrant ./run_tests.sh SHELL end diff --git a/run_tests.sh b/run_tests.sh index 44b0404..246adce 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -17,6 +17,16 @@ set -xeuo pipefail FUNCTIONAL_TEST=${FUNCTIONAL_TEST:-true} +# Install python2 for Ubuntu 16.04 and CentOS 7 + +if which apt-get; then + sudo apt-get update && sudo apt-get install -y python +fi + +if which yum; then + sudo yum install -y python +fi + # Install pip. if ! which pip; then curl --silent --show-error --retry 5 \