summaryrefslogtreecommitdiffstats
path: root/extras/vagrant/vcl_test.sh
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2017-09-15 18:47:44 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-09-17 00:30:20 +0000
commit1948161b65aa89613f3b6d3714158048091a903c (patch)
tree9edacd2302e5d894f9c71fc146c4626c5eb77b60 /extras/vagrant/vcl_test.sh
parenta0a10830fc9974c21fa260b22323abc798a98049 (diff)
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 <dwallacelf@gmail.com>
Diffstat (limited to 'extras/vagrant/vcl_test.sh')
-rw-r--r--extras/vagrant/vcl_test.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/extras/vagrant/vcl_test.sh b/extras/vagrant/vcl_test.sh
index 9fb924aeddb..3be185170d9 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
+