3 function force_location()
5 current_dir=$(dirname $0);
7 if [ ! -f ${current_dir}/tests/vagrant/vagrant-template/Vagrantfile ]; then
10 echo "The tests/vagrant subdirectory seems to be missing."
12 echo "Please correct the problem and try again."
21 echo "Testing for Vagrant.... (TODO)"
22 echo "Testing for Ansible.... (TODO)"
24 echo "Copy vagrant-template dir to a new workdir based on git branch"
25 BRANCHNAME=`git rev-parse --abbrev-ref HEAD`
27 mkdir -p tests/vagrant/$BRANCHNAME
28 cp -R tests/vagrant/vagrant-template/* tests/vagrant/$BRANCHNAME
30 echo "Creating tar of source...."
31 mkdir -p tests/vagrant/$BRANCHNAME/roles/compile-gluster/files
32 tar chf tests/vagrant/$BRANCHNAME/roles/compile-gluster/files/glusterfs-vagrant-test.tar.gz --exclude=*glusterfs-vagrant-test.tar.gz .
34 echo "change dir to new vagrant dir"
35 cd tests/vagrant/$BRANCHNAME
37 vagrant up --provision