[PATCH] tests: add Vagrantfile to automate running them on virtual machines
Kevin Bullock
kbullock+mercurial at ringworld.org
Sat Jul 12 03:28:24 UTC 2014
On Jul 5, 2014, at 11:42 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> # HG changeset patch
> # User anatoly techtonik <techtonik at gmail.com>
> # Date 1404567148 -10800
> # Sat Jul 05 16:32:28 2014 +0300
> # Branch stable
> # Node ID 65a3d892ee2f147d536ffc5a0af84432fc18eb48
> # Parent 2392b9e1936628faeec818368169a68b1fadd95f
> tests: add Vagrantfile to automate running them on virtual machines
>
> Now running tests is as easy as:
> 1. install vagrant
> 2. $ vagrant up
> 3. $ vagrant ssh -c ./run-tests
Agreed, this would be nice to have. Further comments below.
> diff -r 2392b9e19366 -r 65a3d892ee2f Vagrantfile
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/Vagrantfile Sat Jul 05 16:32:28 2014 +0300
> @@ -0,0 +1,18 @@
> +# -*- mode: ruby -*-
> +
> +# Usage:
> +#
> +# $ vagrant up
> +# $ vagrant ssh -c ./run-tests
> +
> +Vagrant.configure('2') do |config|
> + # Debian 7.4 32-bit i386 without configuration management software
> + config.vm.box = "puppetlabs/debian-7.4-32-nocm"
> + #config.vm.box = "pnd/debian-wheezy32-basebox"
> + config.vm.hostname = "tests"
> +
> + config.vm.define "tests" do |conf|
> + conf.vm.provision :file, source: "contrib/test.run-tests", destination:"run-tests"
Why not just make VirtualBox mount the repo root so that we can run tests the normal way? Make the provisioning script create the ramdisk (and export TMPDIR=/tmp/ram ?).
> + conf.vm.provision :shell, path: "contrib/test.provision"
This filename should end in .sh and probably contain the word 'vagrant'. Or go into a contrib/vagrant/ directory as I suggested elsewhere in this thread.
pacem in terris / мир / शान्ति / سَلاَم / 平和
Kevin R. Bullock
More information about the Mercurial-devel
mailing list