Add frame relay testcase for BSS and SGSN side. The test cases require hdlc interfaces (based on dadhi with super channels and no lmi). Change-Id: I95d64dc26a8d2ff02d6cf2bfcd22a97e5481f957changes/73/20673/1
parent
423d8f48f8
commit
023b61b2cb
@ -0,0 +1,16 @@ |
||||
[ORDERED_INCLUDE] |
||||
# Common configuration, shared between test suites |
||||
"../Common.cfg" |
||||
# testsuite specific configuration, not expected to change |
||||
"./FRNET_Tests.default" |
||||
|
||||
[LOGGING] |
||||
|
||||
[MODULE_PARAMETERS] |
||||
|
||||
[TESTPORT_PARAMETERS] |
||||
|
||||
[MAIN_CONTROLLER] |
||||
|
||||
[EXECUTE] |
||||
FRNET_Tests.control |
@ -0,0 +1,15 @@ |
||||
[ORDERED_INCLUDE] |
||||
# Common configuration, shared between test suites |
||||
"../Common.cfg" |
||||
|
||||
[LOGGING] |
||||
#*.FileMask := LOG_ALL |
||||
ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | DEBUG_ENCDEC | USER |
||||
|
||||
[MODULE_PARAMETERS] |
||||
|
||||
[TESTPORT_PARAMETERS] |
||||
|
||||
[MAIN_CONTROLLER] |
||||
|
||||
[EXECUTE] |
@ -0,0 +1,80 @@ |
||||
module FRNET_Tests { |
||||
|
||||
import from General_Types all; |
||||
import from Osmocom_Types all; |
||||
import from Osmocom_Gb_Types all; |
||||
|
||||
import from NS_Emulation all; |
||||
import from BSSGP_Emulation all; |
||||
|
||||
modulepar { |
||||
NSConfigurations mp_nsconfig := { |
||||
{ |
||||
provider := { |
||||
fr := { |
||||
netdev := "hdlc2", |
||||
dlci := 123 |
||||
} |
||||
}, |
||||
nsvci := 123, |
||||
nsei := 123, |
||||
role_sgsn := true, |
||||
handle_sns := false |
||||
} |
||||
}; |
||||
} |
||||
|
||||
type record GbInstance { |
||||
NS_CT vc_NS, |
||||
BSSGP_CT vc_BSSGP, |
||||
BssgpConfig cfg |
||||
}; |
||||
|
||||
const integer NUM_GB := 1; |
||||
type record length(NUM_GB) of GbInstance GbInstances; |
||||
type record length(NUM_GB) of NSConfiguration NSConfigurations; |
||||
type record length(NUM_GB) of BssgpCellId BssgpCellIds; |
||||
|
||||
|
||||
type component test_CT { |
||||
var GbInstances g_gb; |
||||
}; |
||||
|
||||
private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT { |
||||
var charstring id_idx := id & int2str(offset); |
||||
gb.vc_NS := NS_CT.create(id_idx & "-NSemu"); |
||||
gb.vc_BSSGP := BSSGP_CT.create(id_idx & "-BSSGPemu"); |
||||
connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); |
||||
gb.vc_NS.start(NSStart(mp_nsconfig[offset], id_idx)); |
||||
gb.vc_BSSGP.start(BssgpStart(gb.cfg, testcasename())); |
||||
} |
||||
|
||||
testcase TC_foo() runs on test_CT { |
||||
g_gb[0].cfg := { |
||||
nsei := 123, |
||||
sgsn_role := true, |
||||
bvc := { |
||||
{ |
||||
bvci := 1123, |
||||
cell_id := { |
||||
ra_id := { |
||||
lai := { |
||||
mcc_mnc := '262F42'H, |
||||
lac := 11123 |
||||
}, |
||||
rac := 1 |
||||
}, |
||||
cell_id := 31123 |
||||
}, |
||||
depth := BSSGP_DECODE_DEPTH_LLC |
||||
} |
||||
} |
||||
}; |
||||
f_init_gb(g_gb[0], "gb", 0); |
||||
while (true) { |
||||
f_sleep(100.0); |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,55 @@ |
||||
#!/bin/bash |
||||
|
||||
BASEDIR=../deps |
||||
|
||||
. ../gen_links.sh.inc |
||||
|
||||
#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 TCCInterface.cc TCCInterface_ip.h" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src |
||||
FILES="Socket_API_Definitions.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
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 |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.NS_v7.3.0/src |
||||
FILES="NS_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.BSSGP_v13.0.0/src |
||||
FILES="BSSGP_EncDec.cc BSSGP_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.LLC_v7.1.0/src |
||||
FILES="LLC_EncDec.cc LLC_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.SNDCP_v7.0.0/src |
||||
FILES="SNDCP_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.TELNETasp/src |
||||
FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src |
||||
FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn AF_PACKET_PortTypes.ttcn " |
||||
FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn " |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=../library |
||||
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " |
||||
FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " |
||||
FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " |
||||
FILES+="LLC_Templates.ttcn " |
||||
gen_links $DIR $FILES |
||||
|
||||
ignore_pp_results |
@ -0,0 +1,10 @@ |
||||
#!/bin/bash |
||||
|
||||
FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc " |
||||
FILES+="AF_PACKET_PT.cc " |
||||
FILES+="Native_FunctionDefs.cc " |
||||
FILES+="NS_CodecPort_CtrlFunctDef.cc LLC_EncDec.cc LLC_Types.cc TELNETasp_PT.cc " |
||||
|
||||
export CPPFLAGS_TTCN3="-DNS_EMULATION_FR" |
||||
|
||||
../regen-makefile.sh FRNET_Tests.ttcn $FILES |
@ -0,0 +1,16 @@ |
||||
[ORDERED_INCLUDE] |
||||
# Common configuration, shared between test suites |
||||
"../Common.cfg" |
||||
# testsuite specific configuration, not expected to change |
||||
"./FR_Tests.default" |
||||
|
||||
[LOGGING] |
||||
|
||||
[MODULE_PARAMETERS] |
||||
|
||||
[TESTPORT_PARAMETERS] |
||||
|
||||
[MAIN_CONTROLLER] |
||||
|
||||
[EXECUTE] |
||||
FR_Tests.control |
@ -0,0 +1,15 @@ |
||||
[ORDERED_INCLUDE] |
||||
# Common configuration, shared between test suites |
||||
"../Common.cfg" |
||||
|
||||
[LOGGING] |
||||
#*.FileMask := LOG_ALL |
||||
ConsoleMask := ERROR | WARNING | TESTCASE | TIMEROP_START | DEBUG_ENCDEC | USER |
||||
|
||||
[MODULE_PARAMETERS] |
||||
|
||||
[TESTPORT_PARAMETERS] |
||||
|
||||
[MAIN_CONTROLLER] |
||||
|
||||
[EXECUTE] |
@ -0,0 +1,83 @@ |
||||
module FR_Tests { |
||||
|
||||
import from General_Types all; |
||||
import from Osmocom_Types all; |
||||
import from Osmocom_Gb_Types all; |
||||
|
||||
import from NS_Emulation all; |
||||
import from BSSGP_Emulation all; |
||||
|
||||
modulepar { |
||||
NSConfigurations mp_nsconfig := { |
||||
{ |
||||
provider := { |
||||
fr := { |
||||
netdev := "hdlc1", |
||||
dlci := 123 |
||||
} |
||||
}, |
||||
nsvci := 123, |
||||
nsei := 123, |
||||
role_sgsn := false, |
||||
handle_sns := false |
||||
} |
||||
}; |
||||
} |
||||
|
||||
type record GbInstance { |
||||
NS_CT vc_NS, |
||||
BSSGP_CT vc_BSSGP, |
||||
BssgpConfig cfg |
||||
}; |
||||
|
||||
const integer NUM_GB := 1; |
||||
type record length(NUM_GB) of GbInstance GbInstances; |
||||
type record length(NUM_GB) of NSConfiguration NSConfigurations; |
||||
type record length(NUM_GB) of BssgpCellId BssgpCellIds; |
||||
|
||||
|
||||
type component test_CT { |
||||
var GbInstances g_gb; |
||||
}; |
||||
|
||||
private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT { |
||||
var charstring id_idx := id & int2str(offset); |
||||
gb.vc_NS := NS_CT.create(id_idx & "-NSemu"); |
||||
gb.vc_BSSGP := BSSGP_CT.create(id_idx & "-BSSGPemu"); |
||||
connect(gb.vc_BSSGP:BSCP, gb.vc_NS:NS_SP); |
||||
gb.vc_NS.start(NSStart(mp_nsconfig[offset], id_idx)); |
||||
gb.vc_BSSGP.start(BssgpStart(gb.cfg, testcasename())); |
||||
} |
||||
|
||||
testcase TC_foo() runs on test_CT { |
||||
g_gb[0].cfg := { |
||||
nsei := 123, |
||||
sgsn_role := false, |
||||
bvc := { |
||||
{ |
||||
bvci := 1123, |
||||
cell_id := { |
||||
ra_id := { |
||||
lai := { |
||||
mcc_mnc := '262F42'H, |
||||
lac := 11123 |
||||
}, |
||||
rac := 1 |
||||
}, |
||||
cell_id := 31123 |
||||
}, |
||||
depth := BSSGP_DECODE_DEPTH_LLC |
||||
} |
||||
} |
||||
}; |
||||
f_init_gb(g_gb[0], "gb", 0); |
||||
while (true) { |
||||
f_sleep(100.0); |
||||
} |
||||
} |
||||
|
||||
control { |
||||
execute( TC_foo() ); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,55 @@ |
||||
#!/bin/bash |
||||
|
||||
BASEDIR=../deps |
||||
|
||||
. ../gen_links.sh.inc |
||||
|
||||
#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 TCCInterface.cc TCCInterface_ip.h" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.Common_Components.Socket-API/src |
||||
FILES="Socket_API_Definitions.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
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 |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.NS_v7.3.0/src |
||||
FILES="NS_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.BSSGP_v13.0.0/src |
||||
FILES="BSSGP_EncDec.cc BSSGP_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.LLC_v7.1.0/src |
||||
FILES="LLC_EncDec.cc LLC_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.ProtocolModules.SNDCP_v7.0.0/src |
||||
FILES="SNDCP_Types.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.TELNETasp/src |
||||
FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn" |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=$BASEDIR/titan.TestPorts.AF_PACKET/src |
||||
FILES="AF_PACKET_PT.cc AF_PACKET_PT.hh AF_PACKET_PortType.ttcn AF_PACKET_PortTypes.ttcn " |
||||
FILES+="FrameRelay_Types.ttcn FrameRelay_CodecPort.ttcn FrameRelay_Emulation.ttcn Q931_Types.ttcn Q933_Types.ttcn " |
||||
gen_links $DIR $FILES |
||||
|
||||
DIR=../library |
||||
FILES="Misc_Helpers.ttcn General_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc GSM_Types.ttcn Osmocom_Types.ttcn " |
||||
FILES+="NS_Provider_IPL4.ttcn NS_Provider_FR.ttcn NS_Emulation.ttcnpp NS_CodecPort.ttcn NS_CodecPort_CtrlFunct.ttcn NS_CodecPort_CtrlFunctDef.cc " |
||||
FILES+="BSSGP_Emulation.ttcnpp Osmocom_Gb_Types.ttcn " |
||||
FILES+="LLC_Templates.ttcn " |
||||
gen_links $DIR $FILES |
||||
|
||||
ignore_pp_results |
@ -0,0 +1,9 @@ |
||||
#!/bin/bash |
||||
|
||||
FILES="*.ttcn *.ttcnpp IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc Native_FunctionDefs.cc " |
||||
FILES+="BSSGP_EncDec.cc NS_CodecPort_CtrlFunctDef.cc LLC_EncDec.cc TELNETasp_PT.cc " |
||||
FILES+="AF_PACKET_PT.cc AF_PACKET_PT.hh " |
||||
|
||||
export CPPFLAGS_TTCN3="-DNS_EMULATION_FR" |
||||
|
||||
../regen-makefile.sh FR_Tests.ttcn $FILES |
Loading…
Reference in new issue