Commit c416ab90 authored by Garcia's avatar Garcia
Browse files

Add Vagrant files

parent 9190a00a
Loading
Loading
Loading
Loading
+4 −27
Original line number Diff line number Diff line
@@ -12,32 +12,9 @@ OLDPWD=`pwd`
# Execution path
RUN_PATH="${0%/*}"

UNAME=`uname -n`
if [ "${UNAME}" == "Ubuntu64" ]
then # Win7 Virtualbox Ubuntu 16.04
    CHOWN_USER_GROUP=yann:yann
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "ubuntu-xenial" ]
then # Vqgrant xenial-ubuntu
    CHOWN_USER_GROUP=ubuntu:ubuntu
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "vagrant" ]
then # Vagrant xenial-ubuntu
CHOWN_USER_GROUP=vagrant:vagrant
    SRC_EMCOM_PATH=/media/sf_F_DRIVE/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
elif [ "${UNAME}" == "vagrant-prov" ]
then # Vagrant ubuntu 16.04 with provisioner script to automate ITS project build & test
    CHOWN_USER_GROUP=vagrant:vagrant
#    CHOWN_USER_GROUP=ubuntu:ubuntu
    SRC_EMCOM_PATH=${HOME}/tmp/STF549_ng112
elif [ "${UNAME}" == "yann-FSCOM" ]
then # Win7 cygwin64
    CHOWN_USER_GROUP=yann:None
    SRC_EMCOM_PATH=/cygdrive/f/FSCOM/ETSI/EMCOM/STF549/workspace_titan/STF549_ng112
else # docket-titan
    CHOWN_USER_GROUP=root:root
SRC_EMCOM_PATH=${HOME}/tmp/STF549_ng112
fi

if [ "${PATH_DEV_EMCOM}" == "" ]
then
    PATH_DEV_EMCOM=`pwd`/../etsi_emcom
@@ -198,7 +175,7 @@ done
#cd -

# Apply patches
PATH_PATCHES=`pwd`/etsi_emcom_patches
PATH_PATCHES=`pwd`
if [ -d ${PATH_PATCHES} ]
then
    # Update Ng112
+21 −32
Original line number Diff line number Diff line
@@ -77,19 +77,23 @@ then
fi

cd /home/vagrant/dev 
svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.vagrant.org/svn/ITS/branches/STF525 ./STF525_Its 
cd /home/vagrant/dev/STF525_Its/scripts
git clone https://forge.etsi.org/gitlab/emergency-communications/NG112 ./STF549_Ng112
cd /home/etsi/dev/STF549_Ng112
git checkout TTCN_3_Developments
cd /home/etsi/dev/STF549_Ng112/ttcn
svn co --username $USERNAME --password $PASSWORD --non-interactive svn+ssh://forge.etsi.org/svn/LibSip/trunk ./LibSip \
svn co --username $USERNAME --password $PASSWORD --non-interactive svn+ssh://forge.etsi.org/svn/LibCommon/trunk/ttcn ./LibCommon/ttcn \
cd /home/vagrant/dev/STF549_Ng112/scripts
chmod 775 *.bash devenv.bash.*
cd /home/vagrant/dev/STF525_Its/docker
cd /home/vagrant/dev/STF549_Ng112/docker
chmod 775 *.sh
cd /home/vagrant/dev/STF525_Its
cd /home/vagrant/dev/STF549_Ng112
chmod 775 ./.jenkins.sh
cd /home/vagrant
ln -sf /home/vagrant/dev/STF525_Its/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash
ln -sf /home/vagrant/dev/STF549_Ng112/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash
. /home/vagrant/devenv.bash

# Install all frameworks
cd ${HOME_FRAMEWORKS}

# Install asn1c
cd ${HOME_FRAMEWORKS}
@@ -98,7 +102,6 @@ cd ${HOME_FRAMEWORKS}/asn1c
test -f configure || autoreconf -iv
./configure
make && sudo make install
cd -

# Install GoogleTest
cd ${HOME_FRAMEWORKS}
@@ -107,15 +110,14 @@ cd ${HOME_FRAMEWORKS}/googletest/
cmake .
make CXX=g++
sudo make install
cd -

# Install latest LCOV
cd ${HOME_FRAMEWORKS}
mkdir -p ${HOME_FRAMEWORKS}/lcov
cd ${HOME_FRAMEWORKS}/lcov
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz
tar xf lcov_1.13.orig.tar.gz
sudo make -C lcov-1.13/ install
cd -

# Install lcov to coveralls conversion
sudo gem install coveralls-lcov
@@ -125,38 +127,25 @@ coveralls-lcov -h

# Install eclipse
cd ${HOME_FRAMEWORKS}

wget 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz
rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz

# Checkout the project
if [ ${USERNAME} != '' ] && [ ${PASSWORD} != '' ]
then
    cd ${HOME}/tmp
    svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.etsi.org/svn/ITS/branches/STF525
else
    echo "Pease set <username> & <password> in your local Vagrantfile"
    exit -1
fi

sudo echo "" >> /etc/profile 
sudo echo "export HOME=/home/etsi" >> /etc/profile 
sudo echo "export LD_LIBRARY_PATH=/home/etsi/TriesAndDelete/etsi_its/lib:$LD_LIBRARY_PATH" >> /etc/profile 
sudo echo "export PATH=/home/etsi/bin:$PATH" >> /etc/profile 
sudo echo "cd /home/etsi" >> /etc/profile 
sudo echo "export HOME=/home/vagrant" >> /etc/profile 
sudo echo "export LD_LIBRARY_PATH=/home/vagrant/dev/etsi_its/lib:$LD_LIBRARY_PATH" >> /etc/profile 
sudo echo "export PATH=/home/vagrant/bin:$PATH" >> /etc/profile 
sudo echo "cd /home/vagrant" >> /etc/profile 
sudo echo ". ./devenv.bash" >> /etc/profile 

cd /home/vagrant/dev/STF525_Its/scripts
cd /home/vagrant/dev/STF549_Ng112/scripts
./build_titan.bash 
. /home/etsi/devenv.bash 
. /home/vagrant/devenv.bash 
./update_its_project.bash
#ln -sf ~/TriesAndDelete/etsi_its/lib/libItsAsn.so ~/lib/libItsAsn.so
#cd ${HOME}/TriesAndDelete/etsi_its/src/TestCodec/objs
#. ${HOME}/devenv.bash
#../bin/testcodec_generate_makefile.bash
#../bin/run_mtc.bash &
#../bin/run_ptcs.bash
cd /home/vagrant/dev/etsi_emco/src/TestCodec/objs
. ${HOME}/devenv.bash
../bin/testcodec_generate_makefile.bash
../bin/run_all.bash

cd ${OLD_PWD}