bsc: Add VTY module to BSC_Tests

Change-Id: Ia78f1231f56fc5f3b003bccc850ea109ed4ed2d8
This commit is contained in:
Harald Welte 2018-02-12 18:09:38 +01:00
parent a4ca446034
commit bc03c7693f
4 changed files with 27 additions and 3 deletions

View File

@ -12,6 +12,14 @@ mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
[TESTPORT_PARAMETERS]
#*.*.udpReuseAddress := "yes";
*.BSCVTY.CTRL_MODE := "client"
*.BSCVTY.CTRL_HOSTNAME := "127.0.0.1"
*.BSCVTY.CTRL_PORTNUM := "4242"
*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes"
*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
*.BSCVTY.CTRL_READMODE := "buffered"
*.BSCVTY.CTRL_CLIENT_CLEANUP_LINEFEED := "yes"
*.BSCVTY.PROMPT1 := "OsmoBSC> "
[MODULE_PARAMETERS]
#mp_bsc_rsl_port := 3003;
@ -30,6 +38,7 @@ mtc.FileMask := LOG_ALL | TTCN_DEBUG | TTCN_MATCHING | DEBUG_ENCDEC;
#};
#mp_ipa_mgcp_uses_osmo_ext := true;
Osmocom_VTY_Functions.mp_prompt_prefix := "OsmoBSC";
[MAIN_CONTROLLER]

View File

@ -37,6 +37,9 @@ import from Osmocom_CTRL_Functions all;
import from Osmocom_CTRL_Types all;
import from Osmocom_CTRL_Adapter all;
import from Osmocom_VTY_Functions all;
import from TELNETasp_PortType all;
import from MobileL3_CommonIE_Types all;
import from MobileL3_Types all;
import from L3_Templates all;
@ -63,6 +66,7 @@ type component test_CT extends CTRL_Adapter_CT {
port IPA_RSL_PT IPA_RSL[NUM_BTS];
var MGCP_Emulation_CT vc_MGCP;
port TELNETasp_PT BSCVTY;
var BSSAP_Adapter g_bssap;
/* for old legacy-tests only */
@ -235,6 +239,12 @@ function f_init_mgcp(charstring id) runs on test_CT {
vc_MGCP.start(MGCP_Emulation.main(ops, mgcp_pars, id));
}
private function f_init_vty(charstring id) runs on test_CT {
map(self:BSCVTY, system:BSCVTY);
f_vty_set_prompts(BSCVTY);
f_vty_transceive(BSCVTY, "enable");
}
/* global initialization function
* \param nr_bts Number of BTSs we should start/bring up
* \param handler_mode Start an RSL_Emulation_CT component (true) or not (false) */
@ -258,6 +268,7 @@ function f_init(integer nr_bts := NUM_BTS, boolean handler_mode := false) runs o
f_ipa_ctrl_start(mp_bsc_ip, mp_bsc_ctrl_port);
f_init_mgcp("VirtMSC");
f_init_vty("VirtMSC");
for (i := 0; i < nr_bts; i := i+1) {
/* wait until osmo-bts-omldummy has respawned */

View File

@ -75,6 +75,10 @@ DIR=$BASEDIR/titan.ProtocolModules.RTP/src
FILES="RTP_EncDec.cc RTP_Types.ttcn"
gen_links $DIR $FILES
DIR=../library
FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn"
DIR=$BASEDIR/titan.TestPorts.TELNETasp/src
FILES="TELNETasp_PT.cc TELNETasp_PT.hh TELNETasp_PortType.ttcn"
gen_links $DIR $FILES
DIR=../library
FILES="General_Types.ttcn Osmocom_Types.ttcn GSM_Types.ttcn Osmocom_VTY_Functions.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPA_Types.ttcn IPA_CodecPort.ttcn IPA_CodecPort_CtrlFunct.ttcn IPA_CodecPort_CtrlFunctDef.cc IPA_Emulation.ttcn L3_Templates.ttcn BSSMAP_Templates.ttcn BSSMAP_Emulation.ttcn RLCMAC_CSN1_Types.ttcn GSM_RR_Types.ttcn RSL_Types.ttcn RSL_Emulation.ttcn MGCP_Emulation.ttcn MGCP_Types.ttcn MGCP_Templates.ttcn MGCP_CodecPort.ttcn MGCP_CodecPort_CtrlFunct.ttcn MGCP_CodecPort_CtrlFunctDef.cc BSSAP_CodecPort.ttcn BSSAP_Adapter.ttcn Osmocom_CTRL_Types.ttcn Osmocom_CTRL_Functions.ttcn Osmocom_CTRL_Adapter.ttcn RTP_CodecPort.ttcn RTP_CodecPort_CtrlFunct.ttcn RTP_CodecPort_CtrlFunctDef.cc RTP_Emulation.ttcn IuUP_Types.ttcn IuUP_EncDec.cc IuUP_Emulation.ttcn GSUP_Types.ttcn"
gen_links $DIR $FILES

View File

@ -2,6 +2,6 @@
MAIN=BSC_Tests.ttcn
FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc *.c"
FILES="*.ttcn IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc SCTPasp_PT.cc RTP_EncDec.cc SDP_EncDec.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc IuUP_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc *.c"
../regen-makefile.sh $MAIN $FILES