summaryrefslogtreecommitdiffstats
path: root/Vagrantfile
diff options
context:
space:
mode:
authorJoris Roovers <jroovers@cisco.com>2016-08-04 14:53:21 +0200
committerJoris Roovers <jroovers@cisco.com>2016-08-04 14:53:21 +0200
commit8cf6c328fec8063897b109fa215e6653301b9525 (patch)
tree1b823caef8acfbba7402a382bda2fcb7a7e66800 /Vagrantfile
parentc6077c23d6f815a8b96382fd40328458614e1f08 (diff)
Fix for python 3 test failures + run_tests.sh improvements
- importlib is now only used for python 2.6 and not included for all builds. This fixes issues with python3. - run_tests.sh: --clean option: clean up the working directory (delete cache, dist, build, etc) - run_tests.sh: --install-virtualenvs and --remove-virtualenvs options to install/remove virtualenvs for other python versions. This code used to live in the Vagrantfile but has been moved to run_tests.sh so that it can be used more easily during development.
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile35
1 files changed, 4 insertions, 31 deletions
diff --git a/Vagrantfile b/Vagrantfile
index eaed7d2..357758c 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -4,42 +4,15 @@
VAGRANTFILE_API_VERSION = "2"
INSTALL_DEPS=<<EOF
-rm -rf .venv26 .venv27 .venv33 .venv34 .venv35
+cd /vagrant
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install -y python2.6-dev python2.7-dev python3.3-dev python3.4-dev python3.5-dev
sudo apt-get install -y python-virtualenv git ipython python3-pip silversearcher-ag
sudo pip3 install virtualenv
-cd /vagrant
-virtualenv -p /usr/bin/python2.6 .venv26
-pip install -r requirements.txt
-pip install -r test-requirements.txt
-deactivate
-
-virtualenv -p /usr/bin/python2.7 .venv27
-source .venv27/bin/activate
-easy_install -U pip
-pip install -r requirements.txt
-pip install -r test-requirements.txt
-deactivate
-
-virtualenv -p /usr/bin/python3.3 .venv33
-source .venv33/bin/activate
-pip3 install -r requirements.txt
-pip3 install -r test-requirements.txt
-deactivate
-
-virtualenv -p /usr/bin/python3.4 .venv34
-source .venv34/bin/activate
-pip3 install -r requirements.txt
-pip3 install -r test-requirements.txt
-deactivate
-
-virtualenv -p /usr/bin/python3.5 .venv35
-source .venv35/bin/activate
-pip3 install -r requirements.txt
-pip3 install -r test-requirements.txt
-deactivate
+
+./run_tests.sh --remove-virtualenvs
+./run_tests.sh --install-virtualenvs
grep 'cd /vagrant' /home/vagrant/.bashrc || echo 'cd /vagrant' >> /home/vagrant/.bashrc
grep 'source .venv27/bin/activate' /home/vagrant/.bashrc || echo 'source .venv27/bin/activate' >> /home/vagrant/.bashrc