2017-09-06 01:59:43 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-09-15 18:47:44 -04:00
|
|
|
if [ -n "$1" ]; then
|
2017-09-06 01:59:43 -04:00
|
|
|
VPP_DIR=$1
|
|
|
|
else
|
|
|
|
VPP_DIR=`dirname $0`/../../
|
|
|
|
fi
|
|
|
|
|
2017-09-15 18:47:44 -04:00
|
|
|
if [ -n "$2" ]; then
|
2017-09-06 01:59:43 -04:00
|
|
|
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
|
2017-09-15 18:47:44 -04:00
|
|
|
$SUDOCMD make dpdk-install-dev build-release
|
|
|
|
sudo sysctl -p$VPP_DIR/src/vpp/conf/80-vpp.conf
|
2017-09-06 01:59:43 -04:00
|
|
|
sudo modprobe uio_pci_generic
|
2017-09-15 18:47:44 -04:00
|
|
|
|
|
|
|
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
|
|
|
|
|