From da3f6693d7a8047b2a6687973ed390d10d2c383c Mon Sep 17 00:00:00 2001 From: garciay Date: Wed, 29 Apr 2020 07:55:27 +0200 Subject: [PATCH] Enhance MEC Dockerfile for Lewis integration --- docker/home/etc/init.d/10-titan.sh | 13 +++++++++---- docker/home/etc/init.d/20-eclipse.sh | 2 +- docker/home/etc/init.d/30-osip.sh | 2 -- docker/home/etc/init.d/40-stf569.sh | 11 ++++++----- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docker/home/etc/init.d/10-titan.sh b/docker/home/etc/init.d/10-titan.sh index 51d5c0a..75625d2 100755 --- a/docker/home/etc/init.d/10-titan.sh +++ b/docker/home/etc/init.d/10-titan.sh @@ -14,9 +14,6 @@ export PATH=$PATH:$TTCN3_DIR/bin mkdir -p "$SRC_DIR" cd "$SRC_DIR/.." || exit 1 -echo "export TTCN3_DIR=$TTCN3_DIR" >> $HOME/.bashrc -echo "export PATH=\$PATH:\$TTCN3_DIR/bin" >> $HOME/.bashrc - # Install titan core git clone --progress "$TITAN_REPO" || exit 1 @@ -32,6 +29,14 @@ EOF make && make install || exit 1 +# To be compiant with build_ttcn3.bash +# TODO Refactor build_ttcn3.bash & devenv.bash +mv ${TTCN3_DIR} ${SRC_DIR} +export TTCN3_DIR=${SRC_DIR}/Install + +echo "export TTCN3_DIR=$TTCN3_DIR" >> $HOME/.bashrc +echo "export PATH=\$PATH:\$TTCN3_DIR/bin" >> $HOME/.bashrc + # Install other repos cd $SRC_DIR/.. || exit 1 cat ${HOME}/etc/titan_repos.txt | grep -v -e '^\s*#' -e 'titan\.core' | while read REPO; do @@ -42,4 +47,4 @@ cat ${HOME}/etc/titan_repos.txt | grep -v -e '^\s*#' -e 'titan\.core' | while re fi done -exit 0 +cd $HOME diff --git a/docker/home/etc/init.d/20-eclipse.sh b/docker/home/etc/init.d/20-eclipse.sh index 3a57859..0f95364 100755 --- a/docker/home/etc/init.d/20-eclipse.sh +++ b/docker/home/etc/init.d/20-eclipse.sh @@ -19,4 +19,4 @@ if wget --progress=dot:mega 'https://www.eclipse.org/downloads/download.php?file rm -f TITAN_Designer_and_Executor_plugin.zip fi -exit 0 +cd ${HOME} diff --git a/docker/home/etc/init.d/30-osip.sh b/docker/home/etc/init.d/30-osip.sh index e618fee..fde0e0d 100755 --- a/docker/home/etc/init.d/30-osip.sh +++ b/docker/home/etc/init.d/30-osip.sh @@ -12,5 +12,3 @@ cd osip make && sudo make install cd ${HOME} - -exit 0 diff --git a/docker/home/etc/init.d/40-stf569.sh b/docker/home/etc/init.d/40-stf569.sh index b49b6b3..49412d2 100755 --- a/docker/home/etc/init.d/40-stf569.sh +++ b/docker/home/etc/init.d/40-stf569.sh @@ -1,5 +1,8 @@ #!/bin/bash +#set -e +set -vx + echo -e "*****************************\n* Checkout STF569 sources\n*****************************\n" mkdir -p ${HOME}/dev && cd ${HOME}/dev || exit 1 @@ -11,13 +14,12 @@ cd /home/etsi/dev/STF569_Mec/ttcn/LibIts git checkout TTF0002 rm -fr asn1 t3q xsd cd ttcn && rm -fr BTP CAM Common DENM GeoNetworking Ipv6OverGeoNetworking IVIM MapemSpatem Pki Security SremSsem +echo -e "*****************************\n* Set up environment\n*****************************\n" cd /home/etsi/dev/STF569_Mec/scripts -chmod 775 *.bash devenv.bash.* -cd /home/etsi ln -sf /home/etsi/dev/STF569_Mec/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash -ls -ltr /home/etsi -export HOME=/home/etsi . /home/etsi/devenv.bash +set +echo -e "*****************************\n* Build Mec test suite\n*****************************\n" cd /home/etsi/dev/STF569_Mec/scripts ./update_mec_project.bash cd /home/etsi/dev/etsi_mec/src/AtsMec/objs @@ -27,4 +29,3 @@ echo -e "*****************************\n* Init Eclipse Workspace\n************** mkdir -p ${HOME}/dev/Workspace/STF569/bin/ cd ${HOME}/dev/Workspace/STF569 -exit 0 -- GitLab