From 3079a64e19e997e6735b633377285bb5718f4067 Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Wed, 6 Sep 2017 01:59:43 -0400 Subject: Fix socket_test.sh vagrant based multi-host tests. Change-Id: I8ef75a0c702098030c6814c127d3443820122327 Signed-off-by: Dave Wallace --- extras/vagrant/Vagrantfile | 4 ++-- extras/vagrant/update.sh | 2 +- extras/vagrant/vcl_test.sh | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 extras/vagrant/vcl_test.sh (limited to 'extras') diff --git a/extras/vagrant/Vagrantfile b/extras/vagrant/Vagrantfile index b463d646092..07db660c034 100644 --- a/extras/vagrant/Vagrantfile +++ b/extras/vagrant/Vagrantfile @@ -8,8 +8,6 @@ Vagrant.configure(2) do |config| if distro == 'centos7' config.vm.box = "puppetlabs/centos-7.2-64-nocm" config.ssh.insert_key = false - elsif distro == 'ubuntu1404' - config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm" else config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm" end @@ -25,6 +23,8 @@ Vagrant.configure(2) do |config| config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"install.sh"), :args => "/vpp" config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"clearinterfaces.sh") config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"run.sh") + elsif post_build == "vcl-test" + config.vm.provision :shell, :path => File.join(File.dirname(__FILE__),"vcl_test.sh"), :args => "/vpp vagrant" end # Add .gnupg dir in so folks can sign patches diff --git a/extras/vagrant/update.sh b/extras/vagrant/update.sh index f4139d74c80..b630449271e 100755 --- a/extras/vagrant/update.sh +++ b/extras/vagrant/update.sh @@ -40,7 +40,7 @@ if [ $DISTRIB_ID == "Ubuntu" ]; then update-alternatives --install /bin/sh sh /bin/bash 100 # Install useful but non-mandatory tools - apt-get install -y emacs x11-utils git-review gdb gdbserver + apt-get install -y emacs x11-utils git-review gdb gdbserver xfce4-terminal iperf3 elif [ $DISTRIB_ID == "CentOS" ]; then # Standard update + upgrade dance yum check-update diff --git a/extras/vagrant/vcl_test.sh b/extras/vagrant/vcl_test.sh new file mode 100644 index 00000000000..9fb924aeddb --- /dev/null +++ b/extras/vagrant/vcl_test.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# Get Command Line arguements if present +VPP_DIR=$1 +if [ "x$1" != "x" ]; then + VPP_DIR=$1 +else + VPP_DIR=`dirname $0`/../../ +fi + +if [ "x$2" != "x" ]; then + SUDOCMD="sudo -H -u $2" +fi + +echo 'Building VCL test apps' +cd $VPP_DIR +$SUDOCMD perl -pi -e 's/noinst_PROGRAMS/bin_PROGRAMS/g' $VPP_DIR/src/uri.am +$SUDOCMD make build-release +echo "export WS_ROOT=$VPP_DIR" | sudo -H -u vagrant tee /home/vagrant/.bash_aliases +source /home/vagrant/.bash_aliases +sudo cp $VPP_DIR/src/vpp/conf/80-vpp.conf /etc/sysctl.d +sudo sysctl -p/etc/sysctl.d/80-vpp.conf +sudo modprobe uio_pci_generic -- cgit 1.2.3-korg