parent
735dd07b38
commit
f6bd980fdd
@ -0,0 +1,19 @@
|
||||
[LOGGING]
|
||||
#FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
|
||||
#ConsoleMask := ERROR | WARNING | TESTCASE | TTCN_MATCHING | DEBUG_ENCDEC
|
||||
#FileMask := LOG_ALL | TTCN_MATCHING;
|
||||
BSSAP.FileMask := LOG_NOTHING;
|
||||
"VirtMSC-M3UA".FileMask := ERROR | WARNING;
|
||||
"VirtMSC-SCCP".FileMask := ERROR | WARNING;
|
||||
"IPA0-RSL-IPA".FileMask := ERROR | WARNING;
|
||||
"IPA0-CTRL-IPA".FileMask := ERROR | WARNING;
|
||||
mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
|
||||
|
||||
[TESTPORT_PARAMETERS]
|
||||
|
||||
[MODULE_PARAMETERS]
|
||||
|
||||
[MAIN_CONTROLLER]
|
||||
|
||||
[EXECUTE]
|
||||
Selftest.control
|
@ -0,0 +1,104 @@
|
||||
module Selftest {
|
||||
|
||||
import from General_Types all;
|
||||
import from Osmocom_Types all;
|
||||
import from GSM_Types all;
|
||||
import from IPL4asp_Types all;
|
||||
import from IPL4asp_PortType all;
|
||||
import from MTP3asp_PortType all;
|
||||
|
||||
import from BSSAP_Types all;
|
||||
//import from BSSAP_Adapter all;
|
||||
import from BSSAP_CodecPort all;
|
||||
import from BSSMAP_Templates all;
|
||||
import from IPA_Emulation all;
|
||||
import from IPA_Types all;
|
||||
import from RSL_Types all;
|
||||
|
||||
import from Osmocom_CTRL_Functions all;
|
||||
import from Osmocom_CTRL_Types all;
|
||||
|
||||
import from MobileL3_CommonIE_Types all;
|
||||
import from L3_Templates all;
|
||||
import from GSM_RR_Types all;
|
||||
|
||||
|
||||
type component IPA_selftest_CT {
|
||||
/* upper end of IPA_Emulation */
|
||||
port MTP3asp_PT IPA_MTP3;
|
||||
port IPA_MGCP_PT IPA_MGCP;
|
||||
port IPA_RSL_PT IPA_RSL;
|
||||
port IPA_CTRL_PT IPA_CTRL;
|
||||
port IPA_SP_PT IPA_SP;
|
||||
|
||||
var IPA_Emulation_CT vc_IPA;
|
||||
|
||||
/* raw IP port */
|
||||
port IPL4asp_PT IP;
|
||||
var ConnectionId g_ip_conn_id := -1;
|
||||
}
|
||||
|
||||
|
||||
function f_ipa_srv_init() runs on IPA_selftest_CT {
|
||||
vc_IPA := IPA_Emulation_CT.create("IPA_Emulation");
|
||||
map(vc_IPA:IPA_PORT, system: IPA_CODEC_PT);
|
||||
connect(vc_IPA:IPA_MGCP_PORT, self:IPA_MGCP);
|
||||
connect(vc_IPA:IPA_RSL_PORT, self:IPA_RSL);
|
||||
connect(vc_IPA:IPA_CTRL_PORT, self:IPA_CTRL);
|
||||
connect(vc_IPA:MTP3_SP_PORT, self:IPA_MTP3);
|
||||
vc_IPA.start(IPA_Emulation.main_server("127.0.0.1", 55555));
|
||||
}
|
||||
|
||||
function f_ipa_wait_up() runs on IPA_selftest_CT {
|
||||
interleave {
|
||||
[] IPA_RSL.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP));
|
||||
[] IPA_CTRL.receive(t_ASP_IPA_EVT_UD(ASP_IPA_EVENT_UP));
|
||||
}
|
||||
}
|
||||
|
||||
function f_tcp_client_init() runs on IPA_selftest_CT {
|
||||
var Result res;
|
||||
map(self:IP, system:IP);
|
||||
res := IPL4asp_PortType.f_IPL4_connect(IP, "127.0.0.1", 55555, "", -1,-1, {tcp:={}});
|
||||
g_ip_conn_id := res.connId;
|
||||
}
|
||||
|
||||
|
||||
template ASP_Send ts_ASP_Send(ConnectionId id, template octetstring tx) := {
|
||||
connId := id,
|
||||
proto := omit,
|
||||
msg := tx
|
||||
}
|
||||
|
||||
testcase TC_ipa_fragment() runs on IPA_selftest_CT {
|
||||
var integer i;
|
||||
var octetstring tx_buf;
|
||||
var RSL_Message rsl;
|
||||
|
||||
f_ipa_srv_init();
|
||||
f_tcp_client_init();
|
||||
f_ipa_wait_up();
|
||||
|
||||
rsl := valueof(ts_RSL_CHAN_RQD('23'O, 2342));
|
||||
tx_buf := enc_PDU_IPA(valueof(ts_PDU_IPA(IPAC_PROTO_RSL_TRX0, enc_RSL_Message(rsl))));
|
||||
/* send in rapid sequence to fill multiple messages in one TCP segment */
|
||||
for (i := 0; i < 10; i := i+1) {
|
||||
IP.send(ts_ASP_Send(g_ip_conn_id, tx_buf));
|
||||
}
|
||||
timer T:= 1.0;
|
||||
T.start;
|
||||
T.timeout;
|
||||
|
||||
for (i := 0; i < 10; i := i+1) {
|
||||
IPA_RSL.receive(tr_ASP_RSL_UD(IPAC_PROTO_RSL_TRX0, rsl));
|
||||
}
|
||||
setverdict(pass);
|
||||
}
|
||||
|
||||
|
||||
control {
|
||||
execute( TC_ipa_fragment() );
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
#!/bin/sh
|
||||
|
||||
BASEDIR=~/projects/git
|
||||
|
||||
gen_links() {
|
||||
DIR=$1
|
||||
FILES=$*
|
||||
for f in $FILES; do
|
||||
echo "Linking $f"
|
||||
ln -sf $DIR/$f $f
|
||||
done
|
||||
}
|
||||
|
||||
#DIR=$BASEDIR/titan.TestPorts.UNIX_DOMAIN_SOCKETasp/src
|
||||
#FILES="UD_PT.cc UD_PT.hh UD_PortType.ttcn UD_Types.ttcn"
|
||||
#gen_links $DIR $FILES
|
||||
|
||||
DIR=$BASEDIR/titan.Libraries.TCCUsefulFunctions/src
|
||||
FILES="TCCInterface_Functions.ttcn TCCConversion_Functions.ttcn TCCConversion.cc TCCConversion.hh TCCInterface.cc TCCInterface_ip.h SDP_EncDec.cc"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src
|
||||
FILES="Socket_API_Definitions.ttcn"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
# Required by MGCP and IPA
|
||||
DIR=$BASEDIR/titan.TestPorts.IPL4asp/src
|
||||
FILES="IPL4asp_Functions.ttcn IPL4asp_PT.cc IPL4asp_PT.hh IPL4asp_PortType.ttcn IPL4asp_Types.ttcn IPL4asp_discovery.cc IPL4asp_protocol_L234.hh"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
# required by IPA Emulation
|
||||
DIR=../MTP3asp_CNL113337/src
|
||||
FILES="MTP3asp_PortType.ttcn MTP3asp_Types.ttcn"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
DIR=../SCCP_CNL113341/src
|
||||
FILES="SCCP_Emulation.ttcn SCCP_Mapping.ttcnpp SCCP_Types.ttcn SCCPasp_Types.ttcn"
|
||||
gen_links $DIR $FILES
|
||||
ln -sf SCCP_Mapping.ttcnpp SCCP_Mapping.ttcn
|
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.BSSMAP_v11.2.0/src
|
||||
FILES="BSSAP_Types.ttcn"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.MobileL3_v13.4.0/src
|
||||
FILES="MobileL3_CC_Types.ttcn MobileL3_CommonIE_Types.ttcn MobileL3_GMM_SM_Types.ttcn MobileL3_MM_Types.ttcn MobileL3_RRM_Types.ttcn MobileL3_SMS_Types.ttcn MobileL3_SS_Types.ttcn MobileL3_Types.ttcn"
|
||||
gen_links $DIR $ILES
|
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.SDP/src
|
||||
FILES="SDP_EncDec.cc SDP_Types.ttcn SDP_parse_.tab.c SDP_parse_.tab.h SDP_parse_parser.h SDP_parser.l
|
||||
SDP_parser.y lex.SDP_parse_.c"
|
||||
gen_links $DIR $FILES
|
||||
|
||||
DIR=../library
|
||||
FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn BSSAP_CodecPort.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn"
|
||||
gen_links $DIR $FILES
|
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
MAIN=Selftest.ttcn
|
||||
|
||||
FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SDP_EncDec.cc *.c"
|
||||
|
||||
ttcn3_makefilegen -l -f $MAIN $FILES
|
||||
#sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
|
||||
sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan /' Makefile
|
||||
#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
|
||||
sed -i -e 's/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include/CPPFLAGS = -D$(PLATFORM) -I$(TTCN3_DIR)\/include -I\/usr\/include\/titan/' Makefile
|
||||
|
||||
# for TITAN 6.3.0
|
||||
sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile
|
||||
sed -i -e 's/\/bin\/compiler/\/bin\/ttcn3_compiler/' Makefile
|
Loading…
Reference in new issue