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>
This commit is contained in:
Dave Wallace
2017-09-15 18:47:44 -04:00
committed by Florin Coras
parent a0a10830fc
commit 1948161b65
6 changed files with 272 additions and 144 deletions

View File

@@ -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