Commit 56073e5c authored by Yann Garcia's avatar Yann Garcia
Browse files

Tests on templates for optional ProtocolIEs

parent 0732e166
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -4,13 +4,22 @@

namespace LibNGAP__EncdecDeclarations {

  BITSTRING fx__enc__PDUSessionResourceSetupRequestTransfer(const NGAP__IEs::PDUSessionResourceSetupRequestTransfer &p) {
    loggers::get_instance().log_msg(">>> fx__enc__PDUSessionResourceSetupRequestTransfer ", p);
    return int2bit(0, 1);
  }

  INTEGER fx__dec__PDUSessionResourceSetupRequestTransfer(BITSTRING &b, NGAP__IEs::PDUSessionResourceSetupRequestTransfer &p) {
    loggers::get_instance().log(">>> fx__dec__PDUSessionResourceSetupRequestTransfer");
    return -1;
  }

  /****************************************************
   * @desc    External function to encode a .... type
   * @param   value to encode
   * @return  encoded value
   ****************************************************/
  /*BITSTRING fx__enc__ProtocolIE(const LibNGAP__TypesAndValues::ProtocolIE &p) {  
      loggers::get_instance().log(">>> fx__enc__ProtocolIE::");
      loggers::get_instance().log_msg(">>> fx__enc__ProtocolIE:: ", p);
      ngap_codec  codec;
      OCTETSTRING os;
+60 −0
Original line number Diff line number Diff line
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).

LogFile := "../logs/AtsNGAP/%e.%h-%r.%s"
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP | PORTEVENT | TESTCASE
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
#TimeStampFormat := DateTime

[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
[DEFINE]
# In this section you can create macro definitions,
# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE].

[INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[ORDERED_INCLUDE]
# To use configuration settings given in other configuration files,
# the configuration files just need to be listed in this section, with their full or relative pathnames.

[EXTERNAL_COMMANDS]
# This section can define external commands (shell scripts) to be executed by the ETS
# whenever a control part or test case is started or terminated.

#BeginTestCase := ""
#EndTestCase := ""
#BeginControlPart := ""
#EndControlPart := ""

[EXECUTE]
# In this section you can specify what parts of your test suite you want to execute.
#AtsImsIot_TestControl.control

# Emergency Network Attachment and Establishment of the Emergency Bearer with USIM.
NGAP_TestCases.TC_NGAP_gNB_or_aMF_testcaseName_01

[GROUPS]
# In this section you can specify groups of hosts. These groups can be used inside the
# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts.

[COMPONENTS]
# This section consists of rules restricting the location of created PTCs.

[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
+106 −0
Original line number Diff line number Diff line
#!/bin/bash
# Copyright ETSI 2018
# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt

set -e
#set -vx

clear

if [ -z "${TOP}" ]
then
    echo "Failed, TOP variable not defined, exit"
    exit 1
fi

CURDIR=`pwd`
TITAN_DIR=${TOP}/..

# Move to the right directory
if [ ! -d ${TITAN_DIR} ]
then
    echo "Titan directory does not exist, create it"
    # Create TITAN directories
    mkdir -p ${TITAN_DIR}
    if [ ! "$?" -eq "0" ]
    then
        echo "Failed, TOP variable not defined, exit"
        exit 2
    fi
    cd ${TITAN_DIR}
    # Clone all TITAN repositories
    if [ ! -f ${CURDIR}/titan_repos.txt ]
    then
        echo "${HOME_BIN}/titan_repos.txt file does not exist, exit"
        rm -fr ${TOP}
        rm -fr ${TOP}/..
        exit 3
    fi
    TITAN_REPOS=`cat ${CURDIR}/titan_repos.txt`
    for i in ${TITAN_REPOS};
    do
        git clone $i
        if [ ! "$?" -eq "0" ]
        then
            echo "Failed to clone $i, exit"
            exit 4
        fi
    done
else
    cd ${TITAN_DIR}
    # Update github folders
    DIRS=`find . -type d -name ".git" -exec dirname {} \;`
    for i in ${DIRS};
    do
        echo "Processing $i..."
        cd $i
        git fetch
        if [ ! "$?" -eq "0" ]
        then
            echo "Failed to fetch $i, continue"
        else 
            git pull
            if [ ! "$?" -eq "0" ]
            then
        echo "Failed to pull $i, continue"
            fi
    fi
        cd -
    done
fi

# Build TITAN core
export JNI=no
export GUI=no
export DEBUG=no
export GEN_PDF=no
if [ -d ${TTCN3_DIR} ]
then
    rm -fr ${TTCN3_DIR}
fi
mkdir ${TTCN3_DIR}
cd ./titan.core
/bin/cat <<EOF > Makefile.personal
JNI:=no
GUI:=no
DEBUG:=no
GEN_PDF:=no
EOF

# To prevent link error /usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command lineema  
sed --in-place 's/LINUX_LIBS     := -lxml2/LINUX_LIBS     := -lxml2 -lpthread/g' ./core/Makefile

echo "Starting build..."
make clean
if [ "${OSTYPE}" == "cygwin" ]
then
    make -j
else
    make
fi
make install
echo "Build done"

# Go back to initial directory
cd ${CURDIR}
exit 0
+77 −0
Original line number Diff line number Diff line
#!/bin/bash

# Turn on debug mode
#set -vx
#set -e

# Colors and Prompt
#export PS1="\w\$ "
#export PS1="\D{%Y-%m-%d %H:%M:%S} \w\n\$ "

export EDITOR=emacs
set -o emacs

# Home working directories
export HOME_FRAMEWORKS=${HOME}/frameworks
export HOME_LIB=${HOME}/lib
export HOME_BIN=${HOME}/bin
export HOME_ETC=${HOME}/etc
export HOME_TMP=${HOME}/tmp
export HOME_DOCS=${HOME}/docs

# Home common include directory
export HOME_INC=${HOME}/include

# Update PATH environment variable
export PATH=${HOME_BIN}:${PATH}

# Update LD_LIBRARY_PATH environment variable
if [ -z "${LD_LIBRARY_PATH}" ]
then
    export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${HOME}/dev/etsi_its/lib
else 
    export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${HOME}/dev/etsi_its/lib:${LD_LIBRARY_PATH}
fi


# Add JAVA support
#export JAVA_VERSION=1.8.0_92
#export JAVA_JDK=jdk${JAVA_VERSION}
#if [ -d "${HOME_FRAMEWORKS}/${JAVA_JDK}" ]
#then
#    export JAVA_HOME=${HOME_FRAMEWORKS}/${JAVA_JDK}/bin
#else
#    unset JAVA_VERSION
#    unset JAVA_JDK
#fi

# Add TITAN support
export TOP=${HOME_FRAMEWORKS}/titan/titan.core
export TTCN3_DIR=${TOP}/Install
if [ -d ${TTCN3_DIR} ]
then
    export TTCN3_BROWSER=mozilla
    export PATH=${TTCN3_DIR}/bin:${PATH}
    export LD_LIBRARY_PATH=${TTCN3_DIR}/lib:${LD_LIBRARY_PATH}
    export MANPATH=${TTCN3_DIR}/man:${MANPATH}
    export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat
    export PATH_DEV_TTCN=${HOME}/dev/ttcn3
    # ITS support
    export PATH_DEV_ITS=${HOME}/dev/TS.ITS
    # Emergency Communication support
    export PATH_DEV_EMCOM=${HOME}/dev/NG112
    # Mobile-Edge Computing support
    export PATH_DEV_MEC=${HOME}/dev/gs032p3-ttcn-test-suite
    # CDM/CISE support
    export PATH_DEV_MEC=${HOME}/dev/cise
    # Validation folder
    export VALIDATION_DIR=${HOME}
fi

export BROWSER=netsurf

export OPENSSL_DIR=/usr/local

export LSAN_OPTIONS=verbosity=1:log_threads=1

+73 −0
Original line number Diff line number Diff line
#!/bin/bash

# Turn on debug mode
#set -vx

set -e

# Colors and Prompt
#export PS1="\w\$ "
#export PS1="\D{%Y-%m-%d %H:%M:%S} \w\n\$ "

export TERM=xterm
export EDITOR=emacs
set -o emacs

# Home working directories
export HOME_FRAMEWORKS=${HOME}/frameworks
export HOME_LIB=${HOME}/lib
export HOME_BIN=${HOME}/bin
export HOME_ETC=${HOME}/etc
export HOME_TMP=${HOME}/tmp
export HOME_DOCS=${HOME}/docs

# Home common include directory
export HOME_INC=${HOME}/include

# Update PATH environment variable
export PATH=${HOME_BIN}:${PATH}

# Update LD_LIBRARY_PATH environment variable
if [ "${LD_LIBRARY_PATH}" == "" ]
then
    export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib
else 
    export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${LD_LIBRARY_PATH}
fi


# Add JAVA support
export JAVA_VERSION=1.8.0_92
export JAVA_JDK=jdk${JAVA_VERSION}
if [ -d "${HOME_FRAMEWORKS}/${JAVA_JDK}" ]
then
    export JAVA_HOME=${HOME_FRAMEWORKS}/${JAVA_JDK}/bin
else
    unset JAVA_VERSION
    unset JAVA_JDK
fi

# Add TITAN support
export TOP=${HOME_FRAMEWORKS}/titan/titan.core
export TTCN3_DIR=${TOP}/Install
if [ -d ${TTCN3_DIR} ]
then
    export TTCN3_BROWSER=mozilla
    export PATH=${TTCN3_DIR}/bin:${PATH}
    export LD_LIBRARY_PATH=${TTCN3_DIR}/lib:${LD_LIBRARY_PATH}
    export MANPATH=${TTCN3_DIR}/man:${MANPATH}
    export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat
    export PATH_DEV_TTCN=${HOME}/dev/ttcn3
    # ITS support
    export PATH_DEV_ITS=${HOME}/dev/TS.ITS
    # Emergency Communication support
    export PATH_DEV_EMCOM=${HOME}/dev/NG112
    # Mobile-Edge Computing support
    export PATH_DEV_MEC=${HOME}/dev/gs032p3-ttcn-test-suite
    # CDM/CISE support
    export PATH_DEV_MEC=${HOME}/dev/cise
    # Validation folder
    export VALIDATION_DIR=${HOME}
fi

export BROWSER=netsurf
Loading