summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2019-07-23 20:38:39 +0200
committerAlexander Couzens <lynxis@fe80.eu>2019-08-12 15:50:39 +0200
commitc5c7da2d0c104346d75f06a359eab9fe3f9d26e0 (patch)
tree2dfa9693dccca50beb9ba373f74c1a7029134c94
parent18ea7b3441cd7f6883e72a9b5c853168f7d7c71f (diff)
sgsn: make the ranap interface optionallynxis/sgsn_iu
Allows to use the test cases without STP Change-Id: I43df456c2d5aa3ba3ea9e34da3f0f96b55f7c9a1
-rw-r--r--sgsn/SGSN_Tests.ttcn28
-rw-r--r--sgsn/SGSN_Tests_Iu.ttcn1
2 files changed, 20 insertions, 9 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index d7ee587..d96d3d9 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -129,6 +129,7 @@ type record of RAN_Configuration RAN_Configurations;
type component test_CT {
var GbInstances g_gb;
var RAN_Adapter g_ranap[NUM_RNC];
+ var boolean g_ranap_enable := false;
var GSUP_Emulation_CT vc_GSUP;
var IPA_Emulation_CT vc_GSUP_IPA;
@@ -174,8 +175,8 @@ type record BSSGP_ConnHdlrPars {
SGSN_ConnHdlrNetworkPars net,
float t_guard,
/* only in IuPS / RANAP case */
- SCCP_PAR_Address sccp_addr_local,
- SCCP_PAR_Address sccp_addr_peer
+ SCCP_PAR_Address sccp_addr_local optional,
+ SCCP_PAR_Address sccp_addr_peer optional
};
private function f_cellid_to_RAI(in BssgpCellId cell_id) return RoutingAreaIdentificationV {
@@ -321,9 +322,11 @@ function f_init(BcdMccMnc mcc_mnc := '262F42'H) runs on test_CT {
f_init_gb(g_gb[1], "SGSN_Test-Gb1", 1);
f_init_gb(g_gb[2], "SGSN_Test-Gb2", 2);
- for (i := 0; i < NUM_RNC; i := i+1) {
- f_ran_adapter_init(g_ranap[i], mp_ranap_cfg[i], "SGSN_Test_" & int2str(i), RNC_RanOps);
- f_ran_adapter_start(g_ranap[i]);
+ if (g_ranap_enable) {
+ for (i := 0; i < NUM_RNC; i := i+1) {
+ f_ran_adapter_init(g_ranap[i], mp_ranap_cfg[i], "SGSN_Test_" & int2str(i), RNC_RanOps);
+ f_ran_adapter_start(g_ranap[i]);
+ }
}
f_init_gsup("SGSN_Test");
f_init_gtp("SGSN_Test");
@@ -383,10 +386,15 @@ runs on test_CT return BSSGP_ConnHdlr {
vec := omit,
net := net_pars,
t_guard := t_guard,
- sccp_addr_local := g_ranap[0].sccp_addr_own,
- sccp_addr_peer := g_ranap[0].sccp_addr_peer
+ sccp_addr_local := omit,
+ sccp_addr_peer := omit
};
+ if (g_ranap_enable) {
+ pars.sccp_addr_local := g_ranap[0].sccp_addr_own;
+ pars.sccp_addr_peer := g_ranap[0].sccp_addr_peer;
+ }
+
vc_conn := BSSGP_ConnHdlr.create(id);
connect(vc_conn:BSSGP[0], gb[0].vc_BSSGP:BSSGP_SP);
connect(vc_conn:BSSGP_PROC[0], gb[0].vc_BSSGP:BSSGP_PROC);
@@ -396,8 +404,10 @@ runs on test_CT return BSSGP_ConnHdlr {
connect(vc_conn:BSSGP_PROC[2], gb[2].vc_BSSGP:BSSGP_PROC);
/* FIXME: support multiple RNCs */
- connect(vc_conn:BSSAP, g_ranap[0].vc_RAN:CLIENT);
- connect(vc_conn:BSSAP_PROC, g_ranap[0].vc_RAN:PROC);
+ if (g_ranap_enable) {
+ connect(vc_conn:BSSAP, g_ranap[0].vc_RAN:CLIENT);
+ connect(vc_conn:BSSAP_PROC, g_ranap[0].vc_RAN:PROC);
+ }
connect(vc_conn:GSUP, vc_GSUP:GSUP_CLIENT);
connect(vc_conn:GSUP_PROC, vc_GSUP:GSUP_PROC);
diff --git a/sgsn/SGSN_Tests_Iu.ttcn b/sgsn/SGSN_Tests_Iu.ttcn
index 2c2a8af..43d1965 100644
--- a/sgsn/SGSN_Tests_Iu.ttcn
+++ b/sgsn/SGSN_Tests_Iu.ttcn
@@ -20,6 +20,7 @@ private function f_TC_iu_attach(charstring id) runs on BSSGP_ConnHdlr {
}
testcase TC_iu_attach() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
+ g_ranap_enable := true;
f_init();
f_sleep(1.0);
vc_conn := f_start_handler(refers(f_TC_iu_attach), testcasename(), g_gb, 1001);