openstack-ansible-os_neutron/Vagrantfile
Cuong Nguyen cbb2e6ecd3 Install python2 for Ubuntu 16.04 and CentOS 7 in Vagrant
- Handle apt-get update in run_tests.sh
- Install python2 for Ubuntu 16.04 and CentOS 7 before executing test
  script.

Change-Id: I439934a463858f46647d8b00467076fbf8f12416
2017-02-07 10:42:22 +07:00

31 lines
792 B
Ruby

# Runs various tests defined in the tox.ini
#
# To run everything but functional tests:
# vagrant up --provision-with bootstrap
#
# To run docs, linters and functional:
# vagrant up
#
# To run docs, linters and func_ovs tests:
# TOX_ENV=func_ovs vagrant up
#
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
# Run docs, linters, etc, but no functional tests
config.vm.provision "bootstrap", type: "shell", inline: <<-SHELL
sudo su -
cd /vagrant
FUNCTIONAL_TEST=false ./run_tests.sh
SHELL
# Run functional tests
config.vm.provision "func_test", type: "shell", inline: <<-SHELL
sudo su -
cd /vagrant
tox -e #{ENV['TOX_ENV'] || "functional"}
SHELL
end