From 1948161b65aa89613f3b6d3714158048091a903c Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Fri, 15 Sep 2017 18:47:44 -0400 Subject: Add multi-vm Vagrantfile for vcl-test. - Existing Vagrantfile is symbolic link to the default Vagrantfile. - In order to run the multi-host vcl test, change Vagrantfile -> Vagrantfile.vcl_test - Fix socket_test.sh & vppcom bugs. Change-Id: I965b7f799135c86e989c08bf6c5909677ef38dea Signed-off-by: Dave Wallace --- extras/vagrant/vcl_test.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'extras/vagrant/vcl_test.sh') diff --git a/extras/vagrant/vcl_test.sh b/extras/vagrant/vcl_test.sh index 9fb924ae..3be18517 100644 --- a/extras/vagrant/vcl_test.sh +++ b/extras/vagrant/vcl_test.sh @@ -1,23 +1,25 @@ #!/bin/bash -# Get Command Line arguements if present -VPP_DIR=$1 -if [ "x$1" != "x" ]; then +if [ -n "$1" ]; then VPP_DIR=$1 else VPP_DIR=`dirname $0`/../../ fi -if [ "x$2" != "x" ]; then +if [ -n "$2" ]; 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 +$SUDOCMD make dpdk-install-dev build-release +sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf sudo modprobe uio_pci_generic + +if [ "$2" = "vagrant" ] && [ -d "/home/vagrant" ] ; then + dot_bash_aliases="/home/$2/.bash_aliases" + echo "export WS_ROOT=$VPP_DIR" | $SUDOCMD tee $dot_bash_aliases + source $dot_bash_aliases +fi + -- cgit 1.2.3-korg