Commit bdfb218c authored by YannGarcia's avatar YannGarcia
Browse files

Reorganize code due to new version of TITAN. No backward compatibility

parents 22d71218 aad71fa3
Loading
Loading
Loading
Loading

switch_its_r1.sh

0 → 100755
+54 −0
Original line number Original line Diff line number Diff line
#!/bin/bash

#set -e
set -vx

BASE_PATH=`pwd`

git checkout devel
git submodule update --init --recursive --remote

cd $BASE_PATH/ttcn
git checkout devel

for i in `find $BASE_PATH/ttcn -type d -name "Ats*"`
do
    cd $i
    git checkout devel
done
for i in `find $BASE_PATH/ttcn/Ats* -type d -name "asn1"`
do
    cd $i
    git checkout testing
    SUB_DIRS=`find . -type d`
    if [ "SUB_DIRS" != "" ]
    then
        for j in $SUB_DIRS
        do
            cd $j
            git checkout testing
            cd -
        done
    fi
done

cd $BASE_PATH
if [ ! -f ./titan-test-system-framework ]
then
    git clone --recurse-submodules --single-branch --branch devel https://labs.etsi.org/rep/cti-tools/titan-test-system-framework.git
    cd ./titan-test-system-framework
else
    cd ./titan-test-system-framework
    git checkout devel
fi
cd ./ttcn/LibHttp
ln -sf module_its.mk module.mk

cd $BASE_PATH/ttcn/LibIts
git checkout devel

cd $BASE_PATH
cp ./ttcn/patch_lib_common_titan/module.mk ./ttcn/LibCommon/
cp ./ttcn/patch_lib_common_titan/ttcn/* ./ttcn/LibCommon/ttcn

exit 0
+7 −6
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@ FROM alpine:3.16


# Install dependencies
# Install dependencies
RUN apk update && \
RUN apk update && \
    apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev
    apk add --no-cache autoconf automake sudo make git g++ diffutils expect openssl-dev libxml2-dev libxml2-utils libxslt-dev libtool ncurses-dev jsoncpp-dev readline-dev flex bison perl libexecinfo-dev bash libedit libedit-dev lksctp-tools lksctp-tools-dev libpcap-dev curl


# Create user and sudouser
# Create user and sudouser
RUN \
RUN \
@@ -22,15 +22,16 @@ WORKDIR /home/etsi
RUN \
RUN \
    mkdir -p frameworks dev tmp \
    mkdir -p frameworks dev tmp \
    && cd frameworks \ 
    && cd frameworks \ 
    && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c \
    && git clone --branch=vlm_test https://github.com/fillabs/asn1c.git ./asn1c.denis \
    && cd ./asn1c \
    && cd ./asn1c.denis \
    && autoreconf -iv && ./configure --prefix=${HOME} && make install \
    && autoreconf -iv && ./configure --prefix=${HOME} && make install \
    && cd - \
    && cd - \
    && mkdir -p titan && cd ./titan \
    && git clone https://github.com/eclipse/titan.core.git || exit 1
    && git clone https://github.com/eclipse/titan.core.git || exit 1
WORKDIR /home/etsi/frameworks/titan.core/
WORKDIR /home/etsi/frameworks/titan/titan.core/


# Setup ENV variables
# Setup ENV variables
ENV TTCN3_DIR=/home/etsi/frameworks/titan.core/Install
ENV TTCN3_DIR=/home/etsi/frameworks/titan/titan.core/Install
ENV PATH=$TTCN3_DIR/bin:$PATH \
ENV PATH=$TTCN3_DIR/bin:$PATH \
    LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH
    LD_LIBRARY_PATH=$TTCN3_DIR/lib:$LD_LIBRARY_PATH


@@ -51,6 +52,6 @@ WORKDIR /home/etsi/dev


EXPOSE 80/tcp 443/tcp 12340-12349/udp
EXPOSE 80/tcp 443/tcp 12340-12349/udp


ENTRYPOINT ["/home/etsi/dev/cise/virtualization/docker/docker-entrypoint.sh"]
ENTRYPOINT ["/home/etsi/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh"]


CMD ["help"]
CMD ["help"]
 No newline at end of file
+10 −1
Original line number Original line Diff line number Diff line
@@ -10,7 +10,7 @@ usage() {
	done
	done
}
}


commands="help,build,clean,list,modulepar,rebuild,run,version"
commands="help,build,clean,ip,list,modulepar,ping,rebuild,build-run,run,version"


if [ $# == 0 ]; then
if [ $# == 0 ]; then
  usage
  usage
@@ -33,15 +33,24 @@ case "$1" in
  clean)
  clean)
    cd ${GEN_DIR} && make clean
    cd ${GEN_DIR} && make clean
    ;;
    ;;
  ip)
    ip address
    ;;
  list)
  list)
    ${cli} -l
    ${cli} -l
    ;;
    ;;
  modulepar)
  modulepar)
    ${cli} -p
    ${cli} -p
    ;;
    ;;
  ping)
    sudo ping $2
    ;;
  rebuild)
  rebuild)
    cd ${GEN_DIR} && rm -fr ./bin ./build ; make
    cd ${GEN_DIR} && rm -fr ./bin ./build ; make
    ;;
    ;;
  build-run)
    d ${GEN_DIR}/scripts && ./run_all.bash 0
    ;;
  run)
  run)
    cd ${GEN_DIR}/scripts && ./run_all.bash
    cd ${GEN_DIR}/scripts && ./run_all.bash
    ;;
    ;;
+5 −4
Original line number Original line Diff line number Diff line
#!/bin/bash
#!/bin/bash
set -exo pipefail
set -exo pipefail
set +vx


cd "$(dirname ${BASH_SOURCE})"
cd "$(dirname ${BASH_SOURCE})"


docker run --rm -it \
docker run --rm -it \
        -w $HOME/dev/TS.ITS \
        -w $HOME/dev/TS.ITS_r1 \
        -e GEN_DIR=$HOME/dev/TS.ITS \
        -e GEN_DIR=$HOME/dev/TS.ITS_r1 \
        -u "$(id -u):$(id -g)" \
        -u "$(id -u):$(id -g)" \
        -v "${PWD}/../..:$HOME/dev/TS.ITS" \
        -v "${PWD}/../..:$HOME/dev/TS.ITS_r1" \
        --entrypoint $HOME/dev/TS.ITS/virtualization/docker/docker-entrypoint.sh \
        --entrypoint $HOME/dev/TS.ITS_r1/virtualization/docker/docker-entrypoint.sh \
        alpine-its:latest "$@"
        alpine-its:latest "$@"
#        -p 0.0.0.0:80:80 \
#        -p 0.0.0.0:80:80 \
#        -p 0.0.0.0:443:443 \
#        -p 0.0.0.0:443:443 \