laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38210?usp=email )
Change subject: s1gw: make number of eNBs configurable via module params ......................................................................
s1gw: make number of eNBs configurable via module params
... so that we can scale the number of eNBs simulated in the *_multi TCs without having to touch and compile code.
Change-Id: Ia80b9118e66a5d6721b89d3ba068227d30dcc01f --- M s1gw/S1GW_Tests.ttcn 1 file changed, 6 insertions(+), 5 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/s1gw/S1GW_Tests.ttcn b/s1gw/S1GW_Tests.ttcn index 1f94477..2090478 100644 --- a/s1gw/S1GW_Tests.ttcn +++ b/s1gw/S1GW_Tests.ttcn @@ -55,6 +55,8 @@ charstring mp_local_statsd_ip := "127.0.4.10"; integer mp_local_statsd_port := 8125; charstring mp_statsd_prefix := "s1gw."; + + integer mp_multi_enb_num := 42; /* number of eNBs in _multi TCs */ }
type component test_CT extends StatsD_Checker_CT { @@ -215,17 +217,16 @@ f_ConnHdlr_s1ap_unregister(g_pars.genb_id); } testcase TC_setup_multi() runs on test_CT { - var ConnHdlrList vc_conns := { }; + var ConnHdlrList vc_conns;
f_init();
- for (var integer i := 0; i < 42; i := i + 1) { + for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { var ConnHdlrPars pars := valueof(t_ConnHdlrPars(i)); - var ConnHdlr vc_conn := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); - vc_conns := vc_conns & { vc_conn }; + vc_conns[i] := f_ConnHdlr_spawn(refers(f_TC_setup_multi), pars); }
- for (var integer i := 0; i < 42; i := i + 1) { + for (var integer i := 0; i < mp_multi_enb_num; i := i + 1) { vc_conns[i].done; } }