vagrant recipe to get a linux machine for testing.
The virtual machine is provided by hashicorp (the company that makes vagrant) and is an Ubuntu Precise 64 The provisioning script that runs in the first boot of the machine will copy and setup a synchronize script so you don't have to run ./autogen.sh and ./configure every time to build in a different OS and you can also build and run on both (guest and host) at the same time. The ./pull_to_vagrant.sh script should be called at least once before building cyassl so you get all the changes from you host machine.
This commit is contained in:
parent
0919a2927c
commit
cc6b11c95b
29
Vagrantfile
vendored
Normal file
29
Vagrantfile
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
$setup = <<SCRIPT
|
||||
apt-get update
|
||||
apt-get install -y git autoconf libtool make valgrind
|
||||
|
||||
cp -rp /vagrant/ cyassl/
|
||||
|
||||
echo "cd cyassl" >> .bashrc
|
||||
echo "echo -e '\e[0;32mRunning cyassl sync\e[0m'" >> .bashrc
|
||||
echo "./pull_to_vagrant.sh" >> .bashrc
|
||||
|
||||
cd cyassl
|
||||
./autogen.sh
|
||||
./configure
|
||||
make check
|
||||
|
||||
cd ..
|
||||
chown -hR vagrant:vagrant cyassl/ /tmp/output
|
||||
|
||||
SCRIPT
|
||||
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
config.vm.box = "hashicorp/precise64"
|
||||
config.vm.provision "shell", inline: $setup
|
||||
end
|
11
pull_to_vagrant.sh
Executable file
11
pull_to_vagrant.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# synchronize without .git and .gitignore to avoid output files
|
||||
rsync --exclude .git --exclude-from .gitignore -rvt /vagrant/ ~/cyassl/
|
||||
|
||||
# synchronize everything else needed.
|
||||
rsync -rvt /vagrant/.git ~/cyassl/
|
||||
rsync -rvt /vagrant/IDE ~/cyassl/
|
||||
rsync -rvt /vagrant/mcapi ~/cyassl/
|
||||
rsync -rvt /vagrant/mplabx ~/cyassl/
|
||||
rsync -rvt /vagrant/configure.ac ~/cyassl/
|
Loading…
x
Reference in New Issue
Block a user