MGCP_Test: add control interface to MGW testsuite

The testsuite for osmo-mgw does not use the control interface yet.

Change-Id: I7324802bf6e692ce8b7d9b269dd2385a7d3d0d77
changes/20/24820/4
Philipp Maier 1 year ago
parent 2ff3e66bf0
commit 3560bd656a
  1. 8
      mgw/MGCP_Test.ttcn
  2. 3
      mgw/gen_links.sh
  3. 4
      mgw/regen_makefile.sh

@ -34,6 +34,9 @@ module MGCP_Test {
import from StatsD_CodecPort all;
import from StatsD_CodecPort_CtrlFunct all;
import from StatsD_Checker all;
import from Osmocom_CTRL_Functions all;
import from Osmocom_CTRL_Types all;
import from Osmocom_CTRL_Adapter all;
const charstring c_mgw_domain := "mgw";
const charstring c_mgw_ep_rtpbridge := "rtpbridge/";
@ -41,7 +44,7 @@ module MGCP_Test {
/* any variables declared in the component will be available to
* all functions that 'run on' the named component, similar to
* class members in C++ */
type component dummy_CT extends StatsD_ConnHdlr {
type component dummy_CT extends StatsD_ConnHdlr, CTRL_Adapter_CT {
port MGCP_CODEC_PT MGCP;
var boolean initialized := false;
var ConnectionId g_mgcp_conn_id := -1;
@ -78,6 +81,7 @@ module MGCP_Test {
PortNumber mp_local_rtp_port_base := 10000;
PortNumber mp_local_osmux_port := 1985;
PortNumber mp_mgw_statsd_port := 8125;
PortNumber mp_mgw_ctrl_port := 4267;
}
private function f_vty_enable_osmux(boolean osmux_on) runs on dummy_CT {
@ -155,6 +159,8 @@ module MGCP_Test {
f_statsd_reset();
}
f_ipa_ctrl_start_client(mp_remote_ipv4, mp_mgw_ctrl_port);
if (isvalue(ep)) {
/* do a DLCX on all connections of the EP */
f_dlcx_ignore(valueof(ep));

@ -46,6 +46,9 @@ FILES+="Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn "
FILES+="Osmocom_VTY_Functions.ttcn "
FILES+="RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc "
FILES+="StatsD_Types.ttcn StatsD_CodecPort.ttcn StatsD_CodecPort_CtrlFunct.ttcn StatsD_CodecPort_CtrlFunctdef.cc StatsD_Checker.ttcn "
FILES+="IPA_Types.ttcn IPA_Emulation.ttcnpp IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc "
FILES+="Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn "
gen_links $DIR $FILES
ignore_pp_results

@ -1,5 +1,7 @@
#!/bin/sh
FILES="*.ttcn SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc OSMUX_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc "
FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc SDP_EncDec.cc *.c MGCP_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc RTP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc OSMUX_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IP_EncDec.cc StatsD_CodecPort_CtrlFunctdef.cc "
export CPPFLAGS_TTCN3="-DIPA_EMULATION_CTRL"
../regen-makefile.sh MGCP_Test.ttcn $FILES

Loading…
Cancel
Save