Commit a257328d authored by Karol Latecki's avatar Karol Latecki Committed by Jim Harris
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/422285


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 75327bc6
Loading
Loading
Loading
Loading
+9 −18
Original line number Diff line number Diff line
@@ -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
    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