summaryrefslogtreecommitdiffstats
path: root/run-tests-in-vagrant.sh
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2016-02-04 14:33:54 +0530
committerNiels de Vos <ndevos@redhat.com>2016-02-06 14:07:52 -0800
commitc7d2037b8c6293663280a759a2e447d5aef130bd (patch)
treebc3d24ec1d415848a4876e85a6da4b138e2b5020 /run-tests-in-vagrant.sh
parent2fe4f758f4f32151ef22d644c4de1e58a508fc3e (diff)
vagrant-tests: Fix bug when git branch name has a /
It is possible for a git branch to have a / in it. Source copy from host to VM used relative path on the assumption that VM vagrant dir will always be three levels down the topdir of repo. This assumption breaks when git branch has a / in it. Of the two solutions to fix it: a. Mangle the git branch name to not have a / b. Accomodate the possibility of have a / in git branch name. I have chosen b) because that looks cleaner. Change-Id: I6b71c31da2f5f7c349d6d6882767768b2534d14f BUG: 1291537 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13355 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'run-tests-in-vagrant.sh')
-rwxr-xr-xrun-tests-in-vagrant.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/run-tests-in-vagrant.sh b/run-tests-in-vagrant.sh
index cf1bdc8bbf2..f66fae0ac3d 100755
--- a/run-tests-in-vagrant.sh
+++ b/run-tests-in-vagrant.sh
@@ -100,7 +100,7 @@ echo
echo "Copying source code from host machine to VM"
cd tests/vagrant/$BRANCHNAME
vagrant ssh-config > ssh_config
-rsync -az -e "ssh -F ssh_config" --rsync-path="sudo rsync" "../../../." vagrant-testVM:/home/vagrant/glusterfs
+rsync -az -e "ssh -F ssh_config" --rsync-path="sudo rsync" "$ORIGIN_DIR/." vagrant-testVM:/home/vagrant/glusterfs
if [ $? -eq 0 ]
then
echo "Copied."