summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrun-tests-in-vagrant.sh4
-rw-r--r--tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml6
-rw-r--r--tests/vagrant/vagrant-template/setup.yml1
3 files changed, 9 insertions, 2 deletions
diff --git a/run-tests-in-vagrant.sh b/run-tests-in-vagrant.sh
index aedf1ca..029439f 100755
--- a/run-tests-in-vagrant.sh
+++ b/run-tests-in-vagrant.sh
@@ -186,7 +186,7 @@ echo
echo
cd tests/vagrant/$BRANCHNAME
-vagrant ssh -c 'cd /home/vagrant/glusterfs; sudo make install' -- -t
+vagrant ssh -c 'cd /home/vagrant/glusterfs; sudo make -j install' -- -t
if [ $? -ne 0 ]
then
echo "make failed, exiting...."
@@ -198,7 +198,7 @@ echo
echo
cd tests/vagrant/$BRANCHNAME
-vagrant ssh -c 'cd /home/vagrant/glusterfs; sudo ./run-tests.sh' -- -t
+vagrant ssh -c "cd /home/vagrant/glusterfs; sudo ./run-tests.sh $*" -- -t
cd $ORIGIN_DIR
echo
echo
diff --git a/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml b/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
new file mode 100644
index 0000000..84dd252
--- /dev/null
+++ b/tests/vagrant/vagrant-template/roles/fix-localhost/tasks/main.yml
@@ -0,0 +1,6 @@
+---
+- name: remove IPv6 address for localhost
+ shell: sed -i '/::1/s/localhost //' /etc/hosts
+
+- name: add IPv4 address for localhost
+ shell: sed -i '/127.0.0.1/s/$/ localhost/' /etc/hosts
diff --git a/tests/vagrant/vagrant-template/setup.yml b/tests/vagrant/vagrant-template/setup.yml
index 454c171..a9e798d 100644
--- a/tests/vagrant/vagrant-template/setup.yml
+++ b/tests/vagrant/vagrant-template/setup.yml
@@ -12,5 +12,6 @@
- mock-user
- selinux
- iptables
+ - fix-localhost
- daemon-services