Also include a ‘fresh’ VM for staticness testing

This fresh VM deliberately contains no dependencies and installs nothing, so it can be used to check that the uploaded binary still runs.
This commit is contained in:
Benjamin Sago 2017-09-30 15:23:55 +02:00
parent 29bb3645f4
commit 02403c7cc5

40
Vagrantfile vendored
View File

@ -1,21 +1,29 @@
require 'date'
Vagrant.configure(2) do |config|
# We use Ubuntu instead of Debian because the image comes with two-way
# shared folder support by default.
UBUNTU = 'ubuntu/xenial64'
# The main VM is the one used for development and testing.
config.vm.define(:exa, primary: true) do |config|
config.vm.provider :virtualbox do |v|
v.name = 'exa'
v.memory = 1024
v.cpus = 1
end
developer = 'ubuntu'
# We use Ubuntu instead of Debian because the image comes with two-way
# shared folder support by default.
config.vm.box = 'ubuntu/xenial64'
config.vm.box = UBUNTU
config.vm.hostname = 'exa'
# Make sure we know the VM images default user name. The cassowary user
# (specified later) is used for most of the test *output*, but we still
# need to know where the target and .cargo directories go.
developer = 'ubuntu'
# Install the dependencies needed for exa to build, as quietly as
# apt can do.
config.vm.provision :shell, privileged: true, inline: <<-EOF
@ -419,7 +427,6 @@ Vagrant.configure(2) do |config|
sudo chmod $perms "#{test_dir}/permissions/$perms"
sudo touch -t #{some_date} "#{test_dir}/permissions/$perms"
done
EOF
old = '200303030000.00'
@ -614,4 +621,23 @@ Vagrant.configure(2) do |config|
cargo kcov --print-install-kcov-sh | sudo sh
EOF
end
end
# Remember that problem that exa had where the binary wasnt actually
# self-contained? Or the problem where the Linux binary was actually the
# macOS binary in disguise?
#
# This is a “fresh” VM that intentionally downloads no dependencies and
# installs nothing so that we can check that exa still runs!
config.vm.define(:fresh) do |config|
config.vm.box = UBUNTU
config.vm.hostname = 'fresh'
config.vm.provider :virtualbox do |v|
v.name = 'exa-fresh'
v.memory = 384
v.cpus = 1
end
end
end