From 6a84b23f25b9fb06facc1317d3ef9612866d74bd Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Tue, 3 Apr 2018 19:12:36 +0200 Subject: bts: enable CTRL interface tests Start and stop the CTRL interface and provide CTRL bind interface config modulepars. Possibly everyones' local setups may need modification to allow the ttcn3-bts-tests to reach osmo-bts-trx's CTRL port. WARNING: This commit has to be merged "at the same time" as I1ec86b157ebd46bf622a0ca51eba225f15c99fbb or the jenkins ttcn3-bts-tests will fail. a) if we want to set a modulepar mp_ctrl_ip here, it needs to be added to osmo-ttcn3-hacks. b) if we have the f_ipa_ctrl_start() in osmo-ttcn3-hacks, we need to configure the proper IP and bind interface here, or all tests will fail because f_ipa_ctrl_start() cannot connect. Change-Id: I502b4891e6720ae2fb251c03542f707880a6f728 --- bts/BTS_Tests.ttcn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bts/BTS_Tests.ttcn') diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn index b68e99b3..4a4ced51 100644 --- a/bts/BTS_Tests.ttcn +++ b/bts/BTS_Tests.ttcn @@ -11,6 +11,7 @@ import from L1CTL_PortType all; import from L1CTL_Types all; import from LAPDm_Types all; import from Osmocom_CTRL_Adapter all; +import from Osmocom_CTRL_Functions all; import from RSL_Types all; import from IPA_Types all; @@ -50,6 +51,8 @@ modulepar { charstring mp_pcu_socket := PCU_SOCK_DEFAULT; integer mp_tolerance_rxqual := 1; integer mp_tolerance_rxlev := 3; + charstring mp_ctrl_ip := "127.0.0.1"; + integer mp_ctrl_port := 4238; } type record of RslChannelNr ChannelNrs; @@ -285,6 +288,7 @@ function f_init(charstring id := "BTS-Test") runs on test_CT { RSL_CCHAN.receive(ASP_IPA_Event:{up_down := ASP_IPA_EVENT_UP}); f_sleep(0.5); /* workaround for OS#3000 */ f_init_vty(id); + f_ipa_ctrl_start(mp_ctrl_ip, mp_ctrl_port); /* Send SI3 to the BTS, it is needed for various computations */ f_rsl_bcch_fill(RSL_SYSTEM_INFO_3, ts_SI3_default); @@ -306,6 +310,7 @@ function f_shutdown() runs on test_CT { /* shut down all "externally interfaced" components first to avoid unclean shutdown */ vc_IPA.stop; vc_RSL.stop; + f_ipa_ctrl_stop(); } /* Attach L1CTL to master test_CT (classic tests, non-handler mode) */ -- cgit v1.2.3