summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-12-17 13:38:39 +0100
committerRaghavendra Talur <rtalur@redhat.com>2018-06-19 11:50:28 +0000
commit64d21769eef85e2588cbe9481a389dc4d68a3cb1 (patch)
treea3769e49a5f0abc1cc6095945d32be085031b048
parenteb472d82a083883335bc494b87ea175ac43471ff (diff)
tests/vagrant: install additional dependencies
The Vagrant box that is used by ./run-tests-in-vagrant.sh does not have all recent dependencies installed. By using 'dnf builddep' to install the BuildRequires from the generated .spec file, most future problems should be prevented. The tests/basic/afr/split-brain-favorite-child-policy.t script uses the 'bc' command. This it a run-time dependency for the test, and will not be found with 'dnf builddep'. Change-Id: Ifdbfc4af2997ea27815126766cc093947ddf523f BUG: 1526780 Signed-off-by: Niels de Vos <ndevos@redhat.com>
-rwxr-xr-xrun-tests-in-vagrant.sh4
-rw-r--r--tests/vagrant/vagrant-template-centos6/roles/install-pkgs/tasks/main.yml1
-rw-r--r--tests/vagrant/vagrant-template-fedora/roles/install-pkgs/tasks/main.yml1
3 files changed, 6 insertions, 0 deletions
diff --git a/run-tests-in-vagrant.sh b/run-tests-in-vagrant.sh
index c72364a..a3f2ac7 100755
--- a/run-tests-in-vagrant.sh
+++ b/run-tests-in-vagrant.sh
@@ -239,6 +239,10 @@ function compile_gluster()
popd
exit 1
fi
+ # Test for missing dependencies based on the BuildRequires in the
+ # glusterfs.spec. If anything is missing, install them (and only then, dnf
+ # cache is a large download).
+ vagrant ssh -c "cd /home/vagrant/glusterfs; ( sudo dnf -C -y builddep --spec glusterfs.spec || sudo dnf -y builddep --spec glusterfs.spec ) $redirect" -- -t
vagrant ssh -c "cd /home/vagrant/glusterfs; sudo make -j install $redirect" -- -t
if [ $? -ne 0 ]
then
diff --git a/tests/vagrant/vagrant-template-centos6/roles/install-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template-centos6/roles/install-pkgs/tasks/main.yml
index 37dbc10..bf3eff0 100644
--- a/tests/vagrant/vagrant-template-centos6/roles/install-pkgs/tasks/main.yml
+++ b/tests/vagrant/vagrant-template-centos6/roles/install-pkgs/tasks/main.yml
@@ -17,6 +17,7 @@
- attr
- autoconf
- automake
+ - bc
- bison
#- libcmocka-devel
- dbench
diff --git a/tests/vagrant/vagrant-template-fedora/roles/install-pkgs/tasks/main.yml b/tests/vagrant/vagrant-template-fedora/roles/install-pkgs/tasks/main.yml
index 4e7d8d0..2512034 100644
--- a/tests/vagrant/vagrant-template-fedora/roles/install-pkgs/tasks/main.yml
+++ b/tests/vagrant/vagrant-template-fedora/roles/install-pkgs/tasks/main.yml
@@ -11,6 +11,7 @@
- attr
- autoconf
- automake
+ - bc
- bison
- libcmocka-devel
- cifs-utils