summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-01-07 18:33:13 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-01-07 18:37:47 +0100
commit578654846cab87615e1f9b86809039848c1527c7 (patch)
tree4f24d59a8e62061b05939cbaf33d3fb010af2314
parent4263c52bd4a8d42af2e484eac49500e68bce96c0 (diff)
MSC_Tests: make sgsap interface optional
At the moment the sgsap always enabled in the testsuite. This means the testsuite will try to connect the SGs interface of osmo-msc on initalization. If the connection fails, the testcase will fail also. Unfortunately the related patches that add the SGs interface to osmo-msc are not yet merged to master. This causes almost all testcases to fail, so lets have the SGs interface as an option that we can switch on when the SGs interface patches are merged to master. Change-Id: I429c0c5250d4b61de8a4d6399f284ce2c87cca93 Related: OS#3645
-rw-r--r--msc/BSC_ConnectionHandler.ttcn8
-rw-r--r--msc/MSC_Tests.ttcn16
2 files changed, 18 insertions, 6 deletions
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index 735cd21..7b88192 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -72,7 +72,8 @@ type record BSC_ConnHdlrPars {
charstring ipa_ctrl_ip,
integer ipa_ctrl_port,
boolean ipa_ctrl_enable,
- boolean mm_info
+ boolean mm_info,
+ boolean sgsap_enable
};
/* get a one-octet bitmaks of supported algorithms based on Classmark information */
@@ -137,8 +138,11 @@ function f_init_handler(BSC_ConnHdlrPars pars, float t_guard := 60.0) runs on BS
activate(as_Tguard());
/* Route all SMPP messages for our MSISDN to us */
f_create_smpp_expect(hex2str(pars.msisdn));
+
/* Route all SGs message for our IMSI to us */
- f_create_sgsap_expect(pars.imsi);
+ if (g_pars.sgsap_enable == true) {
+ f_create_sgsap_expect(pars.imsi);
+ }
if (g_pars.ipa_ctrl_enable == true) {
f_ipa_ctrl_start(g_pars.ipa_ctrl_ip, g_pars.ipa_ctrl_port);
diff --git a/msc/MSC_Tests.ttcn b/msc/MSC_Tests.ttcn
index bf703e6..96ddc8d 100644
--- a/msc/MSC_Tests.ttcn
+++ b/msc/MSC_Tests.ttcn
@@ -119,6 +119,8 @@ modulepar {
charstring mp_mme_name := "mmec01.mmegi0001.mme.epc.mnc070.mcc901.3gppnetwork.org";
charstring mp_vlr_name := "vlr.example.net";
+ boolean mp_sgsap_enable := false;
+
BSSAP_Configurations mp_bssap_cfg := {
{
sccp_service_type := "mtp3_itu",
@@ -277,7 +279,10 @@ function f_init(integer num_bsc := 1) runs on MTC_CT {
f_init_mgcp("MSC_Test");
f_init_gsup("MSC_Test");
f_init_smpp("MSC_Test");
- f_init_sgsap("MSC_Test");
+
+ if (mp_sgsap_enable == true) {
+ f_init_sgsap("MSC_Test");
+ }
map(self:MSCVTY, system:MSCVTY);
f_vty_set_prompts(MSCVTY);
@@ -491,7 +496,8 @@ function f_init_pars(integer imsi_suffix) runs on MTC_CT return BSC_ConnHdlrPars
ipa_ctrl_ip := mp_msc_ip,
ipa_ctrl_port := mp_msc_ctrl_port,
ipa_ctrl_enable := true,
- mm_info := mp_mm_info
+ mm_info := mp_mm_info,
+ sgsap_enable := mp_sgsap_enable
};
return pars;
}
@@ -517,8 +523,10 @@ function f_start_handler_with_pars(void_fn fn, BSC_ConnHdlrPars pars) runs on MT
connect(vc_conn:SMPP, vc_SMPP:SMPP_CLIENT);
connect(vc_conn:SMPP_PROC, vc_SMPP:SMPP_PROC);
/* SGs part */
- connect(vc_conn:SGsAP, vc_SGsAP:SGsAP_CLIENT);
- connect(vc_conn:SGsAP_PROC, vc_SGsAP:SGsAP_PROC);
+ if (mp_sgsap_enable == true) {
+ connect(vc_conn:SGsAP, vc_SGsAP:SGsAP_CLIENT);
+ connect(vc_conn:SGsAP_PROC, vc_SGsAP:SGsAP_PROC);
+ }
/* We cannot use vc_conn.start(f_init_handler(fn, id, pars)); as we cannot have
* a stand-alone 'derefers()' call, see https://www.eclipse.org/forums/index.php/t/1091364/ */