From a257328d69a9646e74cda18fc99e12c6fe4be097 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Tue, 14 Aug 2018 15:36:43 +0200 Subject: [PATCH] scripts/vagrant: sync spdk common for all providers We have to sync spdk sources regardless of used provider. Can also sync tools if available. Change-Id: Ia149a68d632abadf69d20d7c34c6d7f158e2d7cb Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/422285 Tested-by: SPDK CI Jenkins Chandler-Test-Pool: SPDK Automated Test System Reviewed-by: Jim Harris Reviewed-by: Ben Walker --- scripts/vagrant/Vagrantfile | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/vagrant/Vagrantfile b/scripts/vagrant/Vagrantfile index 3be024c3e..0b57d8a91 100644 --- a/scripts/vagrant/Vagrantfile +++ b/scripts/vagrant/Vagrantfile @@ -71,18 +71,6 @@ Vagrant.configure(2) do |config| vb.memory = "#{vmram}" vb.cpus = "#{vmcpu}" - # rsync the spdk directory if provision hasn't happened yet - unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") - if spdk_dir != "none" - config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync", rsync__auto: false - end - - # Copy in the user's tools if they exists - if File.directory?(File.expand_path("~/vagrant_tools")) - config.vm.synced_folder "~/vagrant_tools", "/home/vagrant/tools", type: "rsync", rsync__auto: false - end - end - nvme_disk = 'nvme.vdi' unless File.exist? (nvme_disk) vb.customize ["createhd", "--filename", nvme_disk, "--variant", "Fixed", "--size", "1024"] @@ -119,12 +107,15 @@ Vagrant.configure(2) do |config| # Optional field if we want use other storage pools than default # libvirt.storage_pool_name = "vm" + end - # rsync the spdk directory if provision hasn't happened yet - unless File.exist? (".vagrant/machines/default/virtualbox/action_provision") - if spdk_dir != "none" - config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync" - end - end + # rsync the spdk directory if provision hasn't happened yet + if spdk_dir != "none" + config.vm.synced_folder "#{spdk_dir}", "/home/vagrant/spdk_repo/spdk", type: "rsync", rsync__auto: false + end + + # Copy in the user's tools if they exists + if File.directory?(File.expand_path("~/vagrant_tools")) + config.vm.synced_folder "~/vagrant_tools", "/home/vagrant/tools", type: "rsync", rsync__auto: false end end