]> git.proxmox.com Git - mirror_ovs.git/blame - Vagrantfile
autotest: add autotest framework for adding kernel module unit tests
[mirror_ovs.git] / Vagrantfile
CommitLineData
b56b2566
AZ
1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5VAGRANTFILE_API_VERSION = "2"
6
7$bootstrap_fedora = <<SCRIPT
8yum -y update
9yum -y install autoconf automake openssl-devel libtool \
10 python-twisted-core python-zope-interface PyQt4 \
d06c1ff8
TG
11 desktop-file-utils groff graphviz rpmdevtools \
12 kernel-devel-`uname -r`
b56b2566 13echo "search extra update built-in" >/etc/depmod.d/search_path.conf
ecf68fa4
MS
14cd /vagrant
15./boot.sh
b56b2566
AZ
16SCRIPT
17
18$configure_ovs = <<SCRIPT
19mkdir -p ~/build
20cd ~/build
21/vagrant/configure --with-linux=/lib/modules/`uname -r`/build
22SCRIPT
23
24$build_ovs = <<SCRIPT
25cd ~/build
26make
27SCRIPT
28
29$install_rpm = <<SCRIPT
30cd ~/build
31PACKAGE_VERSION=`autom4te -l Autoconf -t 'AC_INIT:$2' /vagrant/configure.ac`
32make && make dist
33rpmdev-setuptree
34cp openvswitch-$PACKAGE_VERSION.tar.gz $HOME/rpmbuild/SOURCES
d06c1ff8 35rpmbuild --bb -D "kversion `uname -r`" /vagrant/rhel/openvswitch-kmod-fedora.spec
b56b2566
AZ
36rpmbuild --bb --without check /vagrant/rhel/openvswitch-fedora.spec
37sudo rpm -e openvswitch
38sudo rpm -ivh $HOME/rpmbuild/RPMS/x86_64/openvswitch-$PACKAGE_VERSION-1.fc20.x86_64.rpm
39sudo systemctl enable openvswitch
40sudo systemctl start openvswitch
41sudo systemctl status openvswitch
42SCRIPT
43
44Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
ecf68fa4
MS
45 config.vm.box = "chef/fedora-20"
46 config.vm.provision "bootstrap", type: "shell", inline: $bootstrap_fedora
b56b2566
AZ
47 config.vm.provision "configure_ovs", type: "shell", inline: $configure_ovs, privileged: false
48 config.vm.provision "build_ovs", type: "shell", inline: $build_ovs, privileged: false
49 config.vm.provision "install_rpm", type: "shell", inline: $install_rpm, privileged: false
50end