mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +03:00
contrib/vagrant: use Vagrant for running tests on virtual machine
$ cd contrib/vagrant $ vagrant up $ vagrant ssh -c ./run-tests.sh Repository is shared at /hgshared in guest machine.
This commit is contained in:
parent
5fc8526562
commit
bff9cb0660
@ -25,6 +25,7 @@ tests/*.err
|
||||
tests/htmlcov
|
||||
build
|
||||
contrib/hgsh/hgsh
|
||||
contrib/vagrant/.vagrant
|
||||
dist
|
||||
packages
|
||||
doc/common.txt
|
||||
|
4
contrib/vagrant/README.md
Normal file
4
contrib/vagrant/README.md
Normal file
@ -0,0 +1,4 @@
|
||||
Run Mercurial tests with Vagrant:
|
||||
|
||||
$ vagrant up
|
||||
$ vagrant ssh -c ./run-tests.sh
|
14
contrib/vagrant/Vagrantfile
vendored
Normal file
14
contrib/vagrant/Vagrantfile
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
# -*- mode: ruby -*-
|
||||
|
||||
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: "run-tests.sh", destination:"run-tests.sh"
|
||||
conf.vm.provision :shell, path: "provision.sh"
|
||||
conf.vm.synced_folder "../..", "/hgshared"
|
||||
end
|
||||
end
|
10
contrib/vagrant/provision.sh
Normal file
10
contrib/vagrant/provision.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
# This scripts is used to install dependencies for
|
||||
# testing Mercurial. Mainly used by Vagrant (see
|
||||
# Vagrantfile for details).
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update
|
||||
apt-get install -y -q python-dev unzip
|
||||
# run-tests.sh is added by Vagrantfile
|
||||
chmod +x run-tests.sh
|
13
contrib/vagrant/run-tests.sh
Normal file
13
contrib/vagrant/run-tests.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# This scripts is used to setup temp directory in memory
|
||||
# for running Mercurial tests in vritual machine managed
|
||||
# by Vagrant (see Vagrantfile for details).
|
||||
|
||||
cd /hgshared
|
||||
make local
|
||||
cd tests
|
||||
mkdir /tmp/ram
|
||||
sudo mount -t tmpfs -o size=100M tmpfs /tmp/ram
|
||||
export TMPDIR=/tmp/ram
|
||||
./run-tests.py -l --time
|
||||
|
Loading…
Reference in New Issue
Block a user