6d24613b0b
This patch makes the tests (including the test driver) run entirely inside Vagrant, which avoids calling the very slow `vagrant` driver many times for running the tests. On my machine, `./test` runs in 22 seconds, down from hundreds of seconds prior to this patch. This also has the nice side effect of matching how the Travis CI tests were run, so there's no need for a separate `test_travis` anymore.
25 lines
778 B
Ruby
25 lines
778 B
Ruby
Vagrant.configure(2) do |config|
|
|
config.vm.box = 'ubuntu/bionic64'
|
|
|
|
# sync by copying for isolation
|
|
config.vm.synced_folder "..", "/dotbot", mount_options: ["ro"]
|
|
|
|
# disable default synced folder
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
# install packages
|
|
config.vm.provision "shell", inline: <<-EOS
|
|
apt-get -y update
|
|
apt-get install -y git make build-essential libssl-dev zlib1g-dev \
|
|
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
|
|
libncurses5-dev
|
|
EOS
|
|
|
|
# install pyenv
|
|
config.vm.provision "shell", privileged: false, inline: <<-EOS
|
|
rm -rf ~/.pyenv
|
|
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
|
|
echo 'export PATH="$HOME/.pyenv/bin:$PATH"\neval "$(pyenv init -)"' \
|
|
> ~/.bashrc
|
|
EOS
|
|
end
|