diff --git a/test/vagrant-spec/Vagrantfile.spec b/test/vagrant-spec/Vagrantfile.spec index a8043a636..554e8cf4f 100644 --- a/test/vagrant-spec/Vagrantfile.spec +++ b/test/vagrant-spec/Vagrantfile.spec @@ -51,17 +51,23 @@ Vagrant.configure(2) do |global_config| config.vm.synced_folder '.', '/vagrant', disable: true config.vm.synced_folder '../../', '/vagrant' config.vm.provider :vmware_workstation do |vmware| - vmware.vmx["memsize"] = "2048" + vmware.vmx["memsize"] = ENV.fetch("VAGRANT_HOST_MEMORY", "2048") vmware.vmx['vhv.enable'] = 'TRUE' vmware.vmx['vhv.allow'] = 'TRUE' end - config.vm.provision :shell, path: "./scripts/#{platform}-setup.#{provider_name}.sh" - GUEST_BOXES.each do |guest_box, box_version| + config.vm.provision :shell, path: "./scripts/#{platform}-setup.#{provider_name}.sh", run: "once" + GUEST_BOXES.each_with_index do |box_info, idx| + guest_box, box_version = box_info + spec_cmd_args = ENV["VAGRANT_SPEC_ARGS"] + if idx != 0 + spec_cmd_args = "#{spec_cmd_args} --without-component 'cli/*'".strip + end config.vm.provision( :shell, path: "./scripts/#{platform}-run.#{provider_name}.sh", keep_color: true, env: { + "VAGRANT_SPEC_ARGS" => "--no-builtin #{spec_cmd_args}".strip, "VAGRANT_SPEC_BOX" => "/vagrant/test/vagrant-spec/boxes/#{guest_box.sub('/', '_')}.#{provider_name}.#{box_version}.box" } ) diff --git a/test/vagrant-spec/scripts/ubuntu-run.virtualbox.sh b/test/vagrant-spec/scripts/ubuntu-run.virtualbox.sh index 17153557f..35f993609 100644 --- a/test/vagrant-spec/scripts/ubuntu-run.virtualbox.sh +++ b/test/vagrant-spec/scripts/ubuntu-run.virtualbox.sh @@ -2,7 +2,7 @@ set -x export VAGRANT_SPEC_BOX="${VAGRANT_SPEC_BOX}" -vagrant vagrant-spec /vagrant/test/vagrant-spec/configs/vagrant-spec.config.virtualbox.rb +vagrant vagrant-spec ${VAGRANT_SPEC_ARGS} /vagrant/test/vagrant-spec/configs/vagrant-spec.config.virtualbox.rb result=$? exit $result